summaryrefslogtreecommitdiff
path: root/src/netwm.c
diff options
context:
space:
mode:
authorOlivier Fourdan <fourdan@xfce.org>2015-05-18 22:18:48 +0200
committerOlivier Fourdan <fourdan@xfce.org>2015-05-18 22:18:48 +0200
commit71d37e110d78d49a1476235aaa61e8614ca761e1 (patch)
tree286cd78c541e9972b7ee655d338f145299128520 /src/netwm.c
parent303fc7b5cc7a0023a83fe26239ef69693a863233 (diff)
downloadxfwm4-71d37e110d78d49a1476235aaa61e8614ca761e1.tar.gz
Only check for known buttons in _NET_WM_MOVERESIZE
For _NET_WM_MOVERESIZE requests, if the given button does not match any available physical button, we would wait for that (impossible) button combination to be released. Check that the given button is one of the well known button or just wait for any button release otherwise. That fixes an issue with KDE apps where clicking on the menu bar to move the window would hang forever after the mouse button is depressed. Signed-off-by: Olivier Fourdan <fourdan@xfce.org>
Diffstat (limited to 'src/netwm.c')
-rw-r--r--src/netwm.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/netwm.c b/src/netwm.c
index 93ff43f57..ef3552ce1 100644
--- a/src/netwm.c
+++ b/src/netwm.c
@@ -613,26 +613,10 @@ clientNetMoveResize (Client * c, XClientMessageEvent * ev)
button = (int) ev->data.l[3];
event = (XEvent *) ev;
- if (button == 0)
+ /* We don't deal with button > 7, in such a case we pretent it's just any button */
+ if (button > Button7)
{
- button_mask = getMouseXY (screen_info, c->window, &dx, &dy);
- if (button_mask & Button1Mask)
- {
- button = Button1;
- }
- else if (button_mask & Button2Mask)
- {
- button = Button2;
- }
- else if (button_mask & Button3Mask)
- {
- button = Button3;
- }
- else
- {
- /* Fallback */
- button = Button1;
- }
+ button = AnyButton;
}
corner = CORNER_BOTTOM_RIGHT;