From 77a8e11660edd66279f2d3def6de3768874ba780 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 18 Dec 2002 11:34:29 +0000 Subject: can tell where events are coming from! --- otk/eventdispatcher.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'otk/eventdispatcher.cc') diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc index a6d25624..33d8ba2d 100644 --- a/otk/eventdispatcher.cc +++ b/otk/eventdispatcher.cc @@ -34,8 +34,6 @@ void OtkEventDispatcher::clearHandler(Window id) _map.erase(id); } -//#include -#include 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; +} + } -- cgit v1.2.3