namespace otk {
OtkEventDispatcher::OtkEventDispatcher()
- : _fallback(0)
+ : _fallback(0), _master(0)
{
}
{
_map.erase(id);
}
-#include <stdio.h>
+
+//#include <stdio.h>
void OtkEventDispatcher::dispatchEvents(void)
{
XEvent e;
while (XPending(OBDisplay::display)) {
XNextEvent(OBDisplay::display, &e);
+#if defined(DEBUG) && 0
+ printf("Event %d window %lx\n", e.type, e.xany.window);
+#endif
+
it = _map.find(e.xany.window);
if (it != _map.end())
if (handler)
handler->handle(e);
- else {
- // some events have to be handled anyways!
- if (e.type == ConfigureRequest) {
- XWindowChanges xwc;
-
- xwc.x = e.xconfigurerequest.x;
- xwc.y = e.xconfigurerequest.y;
- xwc.width = e.xconfigurerequest.width;
- xwc.height = e.xconfigurerequest.height;
- xwc.border_width = e.xconfigurerequest.border_width;
- xwc.sibling = e.xconfigurerequest.above;
- xwc.stack_mode = e.xconfigurerequest.detail;
-
- XConfigureWindow(OBDisplay::display, e.xconfigurerequest.window,
- e.xconfigurerequest.value_mask, &xwc);
- }
- }
+
+ if (_master)
+ _master->handle(e);
}
}