From 5f45524211c380a0e112054bd6766f2155a41d48 Mon Sep 17 00:00:00 2001 From: Mathias Gumz Date: Tue, 22 Jul 2014 22:03:33 +0200 Subject: 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. --- src/Ewmh.cc | 12 ++++++------ 1 file 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, if (winclient == 0 || winclient->fbwindow() == 0) return true; // ce.data.l[0] = gravity and flags - int x = (ce.data.l[0] & 0x0100) ? ce.data.l[1] : + int x = (ce.data.l[0] & (1 << 8)) ? ce.data.l[1] : winclient->fbwindow()->x(); - int y = (ce.data.l[0] & 0x0200) ? ce.data.l[2] : + int y = (ce.data.l[0] & (1 << 9)) ? ce.data.l[2] : winclient->fbwindow()->y(); - unsigned int width = (ce.data.l[0] & 0x0400) ? ce.data.l[3] : - winclient->fbwindow()->width(); - unsigned int height = (ce.data.l[0] & 0x0800) ? ce.data.l[4] : - winclient->fbwindow()->height(); + unsigned int width = (ce.data.l[0] & (1 << 10)) ? ce.data.l[3] : + winclient->width(); + unsigned int height = (ce.data.l[0] & (1 << 11)) ? ce.data.l[4] : + winclient->height(); int win_gravity=ce.data.l[0] & 0xFF; winclient->fbwindow()->moveResizeForClient(x, y, width, height, win_gravity, winclient->old_bw); -- cgit v0.11.2