summaryrefslogtreecommitdiff
path: root/kde
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2009-03-29 23:55:34 +0200
committerDennis kasprzyk <onestone@compiz-fusion.org>2009-03-29 23:55:34 +0200
commit3b0fa5443ddbfdb704eb3003599bcde2539106d2 (patch)
treeae626ebf8e2db2a3b0a7f21187d3c30e957e7505 /kde
parentdb5b6fb5a6a7cea532bf9d74955918f927f0029a (diff)
downloadzcomp-3b0fa5443ddbfdb704eb3003599bcde2539106d2.tar.gz
zcomp-3b0fa5443ddbfdb704eb3003599bcde2539106d2.tar.bz2
Resize on shade.
Diffstat (limited to 'kde')
-rw-r--r--kde/window-decorator-kde4/window.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/kde/window-decorator-kde4/window.cpp b/kde/window-decorator-kde4/window.cpp
index a5e8d8e..aa87d0d 100644
--- a/kde/window-decorator-kde4/window.cpp
+++ b/kde/window-decorator-kde4/window.cpp
@@ -1628,12 +1628,11 @@ void
KWD::Window::updateWindowGeometry (void)
{
KWindowInfo wInfo = KWindowSystem::windowInfo (mClientId, NET::WMGeometry |
- NET::WMDesktop);
+ NET::WMDesktop | NET::WMState);
QRect geometry = wInfo.geometry ();
- int w, h;
- w = mGeometry.width () + mBorder.left + mBorder.right;
- h = mGeometry.height () + mBorder.top + mBorder.bottom;
+ if (wInfo.state () & NET::Shaded && mType == Normal2D)
+ geometry.setHeight (0);
if (mGeometry.width () != geometry.width () ||
mGeometry.height () != geometry.height ())
@@ -1878,7 +1877,10 @@ KWD::Window::updateState (void)
if (stateChange & NET::KeepBelow && mState & NET::KeepBelow)
mDecor->emitKeepBelowChanged (mState & NET::KeepBelow);
if (stateChange & NET::Shaded)
+ {
mDecor->shadeChange ();
+ updateWindowGeometry ();
+ }
if (stateChange & NET::Sticky)
mDecor->desktopChange ();
}