summaryrefslogtreecommitdiff
path: root/kde
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2010-02-04 19:42:14 +0100
committerDennis Kasprzyk <onestone@compiz-fusion.org>2010-02-04 19:46:29 +0100
commit91a2c2035502acd673ea7de6a74d4fce31bdb21f (patch)
tree2f2b91b7e20fcd230b2d19b1d83ed499c4906eba /kde
parent0813bc61659e212af9df22e30c655fd35f9fbc3d (diff)
downloadzcomp-91a2c2035502acd673ea7de6a74d4fce31bdb21f.tar.gz
zcomp-91a2c2035502acd673ea7de6a74d4fce31bdb21f.tar.bz2
Fixed region handling of new windows.
Diffstat (limited to 'kde')
-rw-r--r--kde/window-decorator-kde4/window.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index 850b7e1..b0956c3 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -818,14 +818,16 @@ KWD::Window::setMask (const QRegion &region, int)
r -= QRegion (mBorder.left, mBorder.top,
mGeometry.width (), mGeometry.height ());
- r = QRegion ();
+
KWD::trapXError ();
- XShapeCombineRegion (QX11Info::display(), mFrame,
- (mType == Normal2D)? ShapeBounding : ShapeInput,
- 0, 0, r.handle (), ShapeSet);
+
+ XShapeCombineMask (QX11Info::display(), mFrame,
+ (mType == Normal2D)? ShapeBounding : ShapeInput,
+ 0, 0, None, ShapeSet);
+
KWD::popXError ();
}
-
+
mShapeSet = false;
return;
}
@@ -857,7 +859,7 @@ KWD::Window::resizeDecoration (bool force)
int w, h;
mDecor->borders (mBorder.left, mBorder.right, mBorder.top, mBorder.bottom);
-
+
mExtents.left = mBorder.left + mPadding.left;
mExtents.right = mBorder.right + mPadding.right;
mExtents.top = mBorder.top + mPadding.top;
@@ -878,7 +880,8 @@ KWD::Window::resizeDecoration (bool force)
}
/* reset shape */
- setMask (QRegion (), 0);
+ if (!force || w != decorWidget ()->width () || h != decorWidget ()->height ())
+ setMask (QRegion (), 0);
if (mPixmap)
{