summaryrefslogtreecommitdiff
path: root/kde/window-decorator
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 14:53:46 +0100
commit0cde4999b7b01eb1bc91cf0aeb0b508288d4016b (patch)
tree4a8a5171bbb4fc55c89d0e42b001e2be3caf8af3 /kde/window-decorator
parent94a24cff269e24b4ab1d23da450bb6f7390d8c81 (diff)
Wait for the proper configure (and map) events before rebinding the decoration pixmap.
- On some systems the decoration widget window gets mapped first and resized after the map. KWD used a wrong window pixmap in this case.
Diffstat (limited to 'kde/window-decorator')
-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 7cda3c6e..2d5ada04 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;
};
}