Don't track Enter/Leave events on app window
Another vestige of the now-gone distinction between application windows and frames.
+1 −7 · 2 files changed
-
grabber.cc+1 −1 -
main.cc+0 −6
@@ -607,7 +607,7 @@ Window get_app_window(Window w) { frame_child.add(w, w2); if (w2 != w) { w = w2; - XSelectInput(dpy, w2, EnterWindowMask | LeaveWindowMask | StructureNotifyMask | PropertyChangeMask); + XSelectInput(dpy, w2, StructureNotifyMask | PropertyChangeMask); } return w2; } @@ -1287,12 +1287,6 @@ void Main::handle_enter_leave(XEvent &ev) { current_app_window.set(get_app_window(w)); if (verbosity >= 3) printf("Entered window 0x%lx -> 0x%lx\n", w, current_app_window.get()); - } else if (ev.type == LeaveNotify) { - if (ev.xcrossing.window != current_app_window.get()) - return; - if (verbosity >= 3) - printf("Left window 0x%lx\n", w); - current_app_window.set(None); } else printf("Error: Bogus Enter/Leave event\n"); }