summaryrefslogtreecommitdiff
path: root/kde
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-11-16 22:54:11 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2009-11-16 22:54:11 +0100
commite3467e5478e4ccb1757cd628b69462b581b5d594 (patch)
treea21dc1d21e457969d069a0d97badcf7b78e57a48 /kde
parentef2899b0827164e08e4a8f0f81153bcc04f52d0a (diff)
downloadzcomp-e3467e5478e4ccb1757cd628b69462b581b5d594.tar.gz
zcomp-e3467e5478e4ccb1757cd628b69462b581b5d594.tar.bz2
Show decoration in a timeout to make sure that Qt gets the Reparenting related events first.
Diffstat (limited to 'kde')
-rw-r--r--kde/window-decorator-kde4/window.cpp20
-rw-r--r--kde/window-decorator-kde4/window.h1
2 files changed, 13 insertions, 8 deletions
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index f2748b6..129198a 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -767,7 +767,6 @@ KWD::Window::createDecoration (void)
decor->init ();
mDecor = decor;
-
mDecor->widget ()->installEventFilter (this);
if (mType != Normal2D)
@@ -801,6 +800,12 @@ KWD::Window::createDecoration (void)
return;
}
+ QTimer::singleShot (0, this, SLOT(resizeDecorationTimeout ()));
+}
+
+void
+KWD::Window::resizeDecorationTimeout ()
+{
resizeDecoration (true);
}
@@ -868,16 +873,15 @@ KWD::Window::resizeDecoration (bool force)
w = mGeometry.width () + mExtents.left + mExtents.right;
h = mGeometry.height () + mExtents.top + mExtents.bottom;
-
+
if (!force)
{
- if (w == decorWidget ()->width () && h == decorWidget ()->height ())
- return;
+ if (w == decorWidget ()->width () && h == decorWidget ()->height ())
+ return;
}
-
+
/* reset shape */
setMask (QRegion (), 0);
-
if (mPixmap)
{
@@ -900,9 +904,9 @@ KWD::Window::resizeDecoration (bool force)
mPixmapQt.fill (Qt::transparent);
if (mPaintRedirector)
- mUpdateProperty = true;
+ mUpdateProperty = true;
else
- updateProperty ();
+ updateProperty ();
}
void
diff --git a/kde/window-decorator-kde4/window.h b/kde/window-decorator-kde4/window.h
index 4c80b9c..2f6f0b2 100644
--- a/kde/window-decorator-kde4/window.h
+++ b/kde/window-decorator-kde4/window.h
@@ -194,6 +194,7 @@ class Window: public QObject, public KDecorationBridgeUnstable {
Cursor positionToCursor (QPoint pos);
private slots:
+ void resizeDecorationTimeout ();
void handlePopupActivated (QAction *action);
void handleOpacityPopupActivated (QAction *action);
void handleDesktopPopupActivated (QAction *action);