From: Reginald Kennedy Date: Sat, 21 Jan 2012 19:46:46 +0000 (+0800) Subject: Ignore window crossing events that are generated when the cursor is not actually... X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=4a043e85195b7337a6087d38d0c6c5c6817f187f;p=spectrwm.git Ignore window crossing events that are generated when the cursor is not actually moved between windows. --- 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)