aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2014-07-22 20:03:33 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2014-07-22 20:03:33 (GMT)
commit5f45524211c380a0e112054bd6766f2155a41d48 (patch)
tree55981a09f9609fbf09f36da3c3e6a2aaa8058215
parentf3e82cae8372c4f4a757e1277a442b5e9056b44f (diff)
downloadfluxbox-5f45524211c380a0e112054bd6766f2155a41d48.zip
fluxbox-5f45524211c380a0e112054bd6766f2155a41d48.tar.bz2
fix _NET_MOVERESIZE_WINDOW resize issue (#1108)
handing over the dimensions of a WinClient client must not contain properties of the FbWinFrame, otherwise they get added twice in FbWinFrame::moveResizeForClient() and thus result in a resizes when no resize is wanted. other changes: it's easier for me to detect the nth bit when the value looks like (1 << 8) instead of 0x0100 (for the 8th bit). that is why i changed 0x0100, 0x0200 etc. in the nearby code.
-rw-r--r--src/Ewmh.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Ewmh.cc b/src/Ewmh.cc
index 291c39b..e7ba9a9 100644
--- a/src/Ewmh.cc
+++ b/src/Ewmh.cc
@@ -1177,14 +1177,14 @@ bool Ewmh::checkClientMessage(const XClientMessageEvent &ce,
1177 if (winclient == 0 || winclient->fbwindow() == 0) 1177 if (winclient == 0 || winclient->fbwindow() == 0)
1178 return true; 1178 return true;
1179 // ce.data.l[0] = gravity and flags 1179 // ce.data.l[0] = gravity and flags
1180 int x = (ce.data.l[0] & 0x0100) ? ce.data.l[1] : 1180 int x = (ce.data.l[0] & (1 << 8)) ? ce.data.l[1] :
1181 winclient->fbwindow()->x(); 1181 winclient->fbwindow()->x();
1182 int y = (ce.data.l[0] & 0x0200) ? ce.data.l[2] : 1182 int y = (ce.data.l[0] & (1 << 9)) ? ce.data.l[2] :
1183 winclient->fbwindow()->y(); 1183 winclient->fbwindow()->y();
1184 unsigned int width = (ce.data.l[0] & 0x0400) ? ce.data.l[3] : 1184 unsigned int width = (ce.data.l[0] & (1 << 10)) ? ce.data.l[3] :
1185 winclient->fbwindow()->width(); 1185 winclient->width();
1186 unsigned int height = (ce.data.l[0] & 0x0800) ? ce.data.l[4] : 1186 unsigned int height = (ce.data.l[0] & (1 << 11)) ? ce.data.l[4] :
1187 winclient->fbwindow()->height(); 1187 winclient->height();
1188 int win_gravity=ce.data.l[0] & 0xFF; 1188 int win_gravity=ce.data.l[0] & 0xFF;
1189 winclient->fbwindow()->moveResizeForClient(x, y, width, height, 1189 winclient->fbwindow()->moveResizeForClient(x, y, width, height,
1190 win_gravity, winclient->old_bw); 1190 win_gravity, winclient->old_bw);