We grab Mod+Button events for our own purposes, and swallow them using
XAllowEvents(AsyncPointer) to prevent the client window from seeing
them. But if events are coming in fast enough (e.g. via fast wheel
scrolling) so that multiple grabbed events are in the queue, the second
queued event would be allowed to leak through to the client by the
unconditional XAllowEvents(ReplayPointer) a few lines later.
---
src/event.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/event.c b/src/event.c
index 2690fbb..4f1287c 100644
--- a/src/event.c
+++ b/src/event.c
@@ -767,14 +767,14 @@ static void handleButtonPress(XEvent * event)
if (event->xbutton.state & ( MOD_MASK | ControlMask )) {
XAllowEvents(dpy, AsyncPointer, CurrentTime);
+ } else {
+ /* if (wPreferences.focus_mode == WKF_CLICK) { */
+ if (wPreferences.ignore_focus_click) {
+ XAllowEvents(dpy, AsyncPointer, CurrentTime);
+ }
+ XAllowEvents(dpy, ReplayPointer, CurrentTime);
+ /* } */
}
-
- /* if (wPreferences.focus_mode == WKF_CLICK) { */
- if (wPreferences.ignore_focus_click) {
- XAllowEvents(dpy, AsyncPointer, CurrentTime);
- }
- XAllowEvents(dpy, ReplayPointer, CurrentTime);
- /* } */
XSync(dpy, 0);
} else if (desc->parent_type == WCLASS_APPICON
|| desc->parent_type == WCLASS_MINIWINDOW ||
desc->parent_type == WCLASS_DOCK_ICON) {
--
1.7.0.4
--
To unsubscribe, send mail to [email protected].