← easystroke

Don't track Enter/Leave events on app window

fc57747fe4ab2fedc6d233819f5f460f4bb9e5a2 · Thomas Jaeger · Aug 9, 2011 16:47

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
diff --git a/grabber.cc b/grabber.cc
index 43b9842..14f373c 100644
--- a/grabber.cc
+++ b/grabber.cc
@@ -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;
 	}
diff --git a/main.cc b/main.cc
index 3abe212..8b820d8 100644
--- a/main.cc
+++ b/main.cc
@@ -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");
 }