summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@opencompositing.org>2008-01-15 14:53:46 +0100
committerDennis kasprzyk <onestone@opencompositing.org>2008-01-15 15:19:02 +0100
commit0ea58487fd2b0db25fae93ff08ae6680d1ad6557 (patch)
tree3a74215a1de8ec577bda7a91424e7ada0cfff5a4
parent061ff1593052b99d9159f21002c85fbab8abc87e (diff)
Wait for the proper configure (and map) events before rebinding the decoration pixmap.compiz-0.6
- On some systems the decoration widget window gets mapped first and resized after the map. KWD used a wrong window pixmap in this case.
-rw-r--r--kde/window-decorator/decorator.cpp2
-rw-r--r--kde/window-decorator/window.cpp20
-rw-r--r--kde/window-decorator/window.h3
3 files changed, 16 insertions, 9 deletions
diff --git a/kde/window-decorator/decorator.cpp b/kde/window-decorator/decorator.cpp
index df2d1880..980233b3 100644
--- a/kde/window-decorator/decorator.cpp
+++ b/kde/window-decorator/decorator.cpp
@@ -589,7 +589,7 @@ KWD::Decorator::x11EventFilter (XEvent *xevent)
else
break;
- if (client->handleConfigure ())
+ if (client->handleConfigure (QSize (xce->width, xce->height)))
{
if (!mIdleTimer.isActive ())
mIdleTimer.start (0, TRUE);
diff --git a/kde/window-decorator/window.cpp b/kde/window-decorator/window.cpp
index 51659957..75f149d2 100644
--- a/kde/window-decorator/window.cpp
+++ b/kde/window-decorator/window.cpp
@@ -1144,15 +1144,18 @@ KWD::Window::resizeDecoration (bool force)
mPicture = 0;
}
+ if (w != width() || h != height())
+ {
+ mPendingConfigure = 1;
+ }
+
setGeometry (QRect (mGeometry.x () + ROOT_OFF_X - mBorder.left,
mGeometry.y () + ROOT_OFF_Y - mBorder.top,
w, h));
- if (mMapped)
- {
- mPendingConfigure++;
- }
- else
+ mSize = QSize (w, h);
+
+ if (!mMapped)
{
mPendingMap = 1;
@@ -1219,12 +1222,15 @@ KWD::Window::handleMap (void)
}
bool
-KWD::Window::handleConfigure (void)
+KWD::Window::handleConfigure (QSize size)
{
if (!mPendingConfigure)
return FALSE;
- mPendingConfigure--;
+ if (size != mSize)
+ return FALSE;
+
+ mPendingConfigure = 0;
if (mPendingConfigure || mPendingMap)
return FALSE;
diff --git a/kde/window-decorator/window.h b/kde/window-decorator/window.h
index eb4a8d3e..d22cff2d 100644
--- a/kde/window-decorator/window.h
+++ b/kde/window-decorator/window.h
@@ -156,7 +156,7 @@ class Window:public QWidget, public KDecorationBridge {
mDamage += QRegion (x, y, w, h);
}
bool handleMap (void);
- bool handleConfigure (void);
+ bool handleConfigure (QSize size);
void processDamage (void);
decor_context_t *context (void)
{
@@ -235,6 +235,7 @@ class Window:public QWidget, public KDecorationBridge {
bool mMapped;
int mPendingMap;
int mPendingConfigure;
+ QSize mSize;
KProcess *mProcessKiller;
};
}