aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/EventManager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/EventManager.cc')
-rw-r--r--src/FbTk/EventManager.cc18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/FbTk/EventManager.cc b/src/FbTk/EventManager.cc
index 9a11ab2..d4f4f4c 100644
--- a/src/FbTk/EventManager.cc
+++ b/src/FbTk/EventManager.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: EventManager.cc,v 1.11 2004/04/19 22:46:46 fluxgen Exp $ 22// $Id: EventManager.cc,v 1.12 2004/05/04 14:33:38 rathnor Exp $
23 23
24#include "EventManager.hh" 24#include "EventManager.hh"
25#include "FbWindow.hh" 25#include "FbWindow.hh"
@@ -128,11 +128,19 @@ void EventManager::unregisterEventHandler(Window win) {
128 128
129void EventManager::dispatch(Window win, XEvent &ev, bool parent) { 129void EventManager::dispatch(Window win, XEvent &ev, bool parent) {
130 EventHandler *evhand = 0; 130 EventHandler *evhand = 0;
131 if (parent) 131 if (parent) {
132 evhand = m_parent[win]; 132 EventHandlerMap::iterator it = m_parent.find(win);
133 else { 133 if (it == m_parent.end())
134 return;
135 else
136 evhand = it->second;
137 } else {
134 win = getEventWindow(ev); 138 win = getEventWindow(ev);
135 evhand = m_eventhandlers[win]; 139 EventHandlerMap::iterator it = m_eventhandlers.find(win);
140 if (it == m_eventhandlers.end())
141 return;
142 else
143 evhand = it->second;
136 } 144 }
137 145
138 if (evhand == 0) 146 if (evhand == 0)