summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrathnor <rathnor>2004-05-24 13:09:32 (GMT)
committerrathnor <rathnor>2004-05-24 13:09:32 (GMT)
commitca307efe3e719fbc3917ae54af4e2243ae0e4044 (patch)
tree2e4de8186dc19584e830eb80dc53336cd9a7a4be /src
parent0cab1dfb3dbe5938f8b9d1b0050cbd9348c4e715 (diff)
downloadfluxbox_lack-ca307efe3e719fbc3917ae54af4e2243ae0e4044.zip
fluxbox_lack-ca307efe3e719fbc3917ae54af4e2243ae0e4044.tar.bz2
handling of alpha = 0
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/FbWindow.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc
index 5ebd9f2..e7649d7 100644
--- a/src/FbTk/FbWindow.cc
+++ b/src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: FbWindow.cc,v 1.33 2004/05/17 15:01:32 rathnor Exp $ 22// $Id: FbWindow.cc,v 1.34 2004/05/24 13:09:32 rathnor Exp $
23 23
24#include "FbWindow.hh" 24#include "FbWindow.hh"
25 25
@@ -240,11 +240,11 @@ void FbWindow::updateTransparent(int the_x, int the_y, unsigned int the_width, u
240 240
241void FbWindow::setAlpha(unsigned char alpha) { 241void FbWindow::setAlpha(unsigned char alpha) {
242#ifdef HAVE_XRENDER 242#ifdef HAVE_XRENDER
243 if (m_transparent.get() == 0 && alpha != 0) { 243 if (m_transparent.get() == 0 && alpha < 255) {
244 m_transparent.reset(new Transparent(getRootPixmap(screenNumber()), window(), alpha, screenNumber())); 244 m_transparent.reset(new Transparent(getRootPixmap(screenNumber()), window(), alpha, screenNumber()));
245 } else if (alpha != 0 && alpha != m_transparent->alpha()) 245 } else if (alpha < 255 && alpha != m_transparent->alpha())
246 m_transparent->setAlpha(alpha); 246 m_transparent->setAlpha(alpha);
247 else if (alpha == 0) 247 else if (alpha == 255)
248 m_transparent.reset(0); // destroy transparent object 248 m_transparent.reset(0); // destroy transparent object
249#endif // HAVE_XRENDER 249#endif // HAVE_XRENDER
250} 250}