JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Ignore window crossing events that are generated when the cursor is not actually...
authorReginald Kennedy <rk@rejii.com>
Sat, 21 Jan 2012 19:46:46 +0000 (03:46 +0800)
committerReginald Kennedy <rk@rejii.com>
Sat, 21 Jan 2012 19:46:46 +0000 (03:46 +0800)
scrotwm.c

index 77e0cd0..92145c4 100644 (file)
--- 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)