summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoronestone <onestone>2006-11-29 21:10:20 +0000
committeronestone <onestone>2006-11-29 21:10:20 +0000
commit9d18851fb10c1b80e3d9789b45c9c1fffd1140ac (patch)
treeca20bf3f5edb4b8db721242f4a5849221e9bb146
parentf74fdcbe9721ce88abad10ae97e801c5ee9d9a38 (diff)
downloadaquamarine-9d18851fb10c1b80e3d9789b45c9c1fffd1140ac.tar.gz
aquamarine-9d18851fb10c1b80e3d9789b45c9c1fffd1140ac.tar.bz2
aquamarine: clear pixmap to avoid wrong rounded cornes, fixes #45
-rw-r--r--src/switcher.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/switcher.cpp b/src/switcher.cpp
index de25848..02523fb 100644
--- a/src/switcher.cpp
+++ b/src/switcher.cpp
@@ -115,6 +115,18 @@ Aquamarine::Switcher::updateGeometry ()
XClearWindow (qt_xdisplay (), m_wid);
XSync (qt_xdisplay (), FALSE);
+
+ Pixmap pix = m_qpixmap.handle ();
+ XGCValues gcv;
+ gcv.foreground = 0x00000000;
+ gcv.plane_mask = 0xffffffff;
+ GC gc = XCreateGC (qt_xdisplay (), pix, GCForeground, &gcv);
+
+ XFillRectangle (qt_xdisplay (), pix, gc, 0, 0,
+ width + LEFT + RIGHT, height + TOP + BOTTOM);
+
+ XFreeGC (qt_xdisplay (), gc);
+
QPainter
p (&m_qpixmap);