summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2002-12-04 00:03:48 +0000
committerDana Jansens <danakj@orodu.net>2002-12-04 00:03:48 +0000
commit52b83a9dbb2b7823d5f78781f5948dfd8d77d50b (patch)
tree44f7c8de7cc1475387ac75764b5b27ef0c26a23d
parent829ce05c7c7fe3697d11739d12577c7151d9953d (diff)
handle configurerequests when we cant find a target registered for them
-rw-r--r--otk/eventdispatcher.cc20
1 files changed, 19 insertions, 1 deletions
diff --git a/otk/eventdispatcher.cc b/otk/eventdispatcher.cc
index 41201924..75a06ea1 100644
--- a/otk/eventdispatcher.cc
+++ b/otk/eventdispatcher.cc
@@ -33,7 +33,7 @@ void OtkEventDispatcher::clearHandler(Window id)
{
_map.erase(id);
}
-
+#include <stdio.h>
void OtkEventDispatcher::dispatchEvents(void)
{
XEvent e;
@@ -42,6 +42,7 @@ void OtkEventDispatcher::dispatchEvents(void)
while (XPending(OBDisplay::display)) {
XNextEvent(OBDisplay::display, &e);
+
it = _map.find(e.xany.window);
if (it != _map.end())
@@ -51,6 +52,23 @@ void OtkEventDispatcher::dispatchEvents(void)
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);
+ }
+ }
}
}