From 4a043e85195b7337a6087d38d0c6c5c6817f187f Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Sun, 22 Jan 2012 03:46:46 +0800 Subject: [PATCH] Ignore window crossing events that are generated when the cursor is not actually moved between windows. --- scrotwm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scrotwm.c b/scrotwm.c index 77e0cd0..92145c4 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -6089,6 +6089,11 @@ enternotify(XEvent *e) ev->window, ev->mode, ev->detail, ev->root, ev->subwindow, ev->same_screen, ev->focus, ev->state); + if (ev->mode != NotifyNormal) { + DNPRINTF(SWM_D_EVENT, "ignoring enternotify: generated by cursor grab.\n"); + return; + } + switch (focus_mode) { case SWM_FOCUS_DEFAULT: break; @@ -6288,8 +6293,8 @@ propertynotify(XEvent *e) struct ws_win *win; XPropertyEvent *ev = &e->xproperty; - DNPRINTF(SWM_D_EVENT, "propertynotify: window: %lu\n", - ev->window); + DNPRINTF(SWM_D_EVENT, "propertynotify: window: %lu atom:%s\n", + ev->window, XGetAtomName(display, ev->atom)); win = find_window(ev->window); if (win == NULL) -- 2.39.2