From a2013ee9dd9b152c044f8120a89c3d5aa17af4ea Mon Sep 17 00:00:00 2001 From: okan Date: Sat, 19 Oct 2013 19:39:34 +0000 Subject: Using xu_btn_ungrab() buttons during client_leave doesn't work (error BadValue) when the modifier is already AnyModifier . Instead alter xu_btn_ungrab() to ungrab AnyButton/AnyModifier and call it only when a client is coming into focus in client_setactive(), instead of iterating over ignore mods - matches how we handle key grabs. --- xutil.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index 543b8b0..f33fa9a 100644 --- a/xutil.c +++ b/xutil.c @@ -65,12 +65,9 @@ xu_btn_grab(Window win, int mask, u_int btn) } void -xu_btn_ungrab(Window win, int mask, u_int btn) +xu_btn_ungrab(Window win) { - u_int i; - - for (i = 0; i < nitems(ign_mods); i++) - XUngrabButton(X_Dpy, btn, (mask | ign_mods[i]), win); + XUngrabButton(X_Dpy, AnyButton, AnyModifier, win); } void -- cgit 1.4.1