]> Dogcows Code - chaz/openbox/blobdiff - otk/eventdispatcher.cc
can tell where events are coming from!
[chaz/openbox] / otk / eventdispatcher.cc
index a6d25624612a3d7abd6eb7713b431c57e734f9fa..33d8ba2d8150b9f178d81540ec6dae097101c83f 100644 (file)
@@ -34,8 +34,6 @@ void OtkEventDispatcher::clearHandler(Window id)
   _map.erase(id);
 }
 
-//#include <stdio.h>
-#include <stdio.h>
 void OtkEventDispatcher::dispatchEvents(void)
 {
   XEvent e;
@@ -45,7 +43,7 @@ void OtkEventDispatcher::dispatchEvents(void)
   while (XPending(OBDisplay::display)) {
     XNextEvent(OBDisplay::display, &e);
 
-#if defined(DEBUG) && 0
+#if 0
     printf("Event %d window %lx\n", e.type, e.xany.window);
 #endif
 
@@ -91,4 +89,12 @@ void OtkEventDispatcher::dispatchEvents(void)
   }
 }
 
+OtkEventHandler *OtkEventDispatcher::findHandler(Window win)
+{
+  OtkEventMap::iterator it = _map.find(win);
+  if (it != _map.end())
+    return it->second;
+  return 0;
+}
+
 }
This page took 0.022366 seconds and 4 git commands to generate.