]>
Dogcows Code - chaz/openbox/blob - eventdispatcher.cc
a34dd9b4dd4575eed3574e4db06837e2f8539037
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
4 # include "../config.h"
7 #include "eventdispatcher.hh"
13 OtkEventDispatcher::OtkEventDispatcher()
14 : _fallback(0), _master(0)
18 OtkEventDispatcher::~OtkEventDispatcher()
22 void OtkEventDispatcher::clearAllHandlers(void)
27 void OtkEventDispatcher::registerHandler(Window id
, OtkEventHandler
*handler
)
29 _map
.insert(std::pair
<Window
, OtkEventHandler
*>(id
, handler
));
32 void OtkEventDispatcher::clearHandler(Window id
)
38 void OtkEventDispatcher::dispatchEvents(void)
41 OtkEventHandler
*handler
;
42 OtkEventMap::iterator it
;
44 while (XPending(OBDisplay::display
)) {
45 XNextEvent(OBDisplay::display
, &e
);
47 #if defined(DEBUG) && 0
48 printf("Event %d window %lx\n", e
.type
, e
.xany
.window
);
51 it
= _map
.find(e
.xany
.window
);
This page took 0.036788 seconds and 3 git commands to generate.