aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pugl/detail/x11.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 72dcf59..3684e46 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -822,6 +822,15 @@ puglDispatchX11Events(PuglWorld* world)
view->frame.y = event.configure.y;
view->frame.width = event.configure.width;
view->frame.height = event.configure.height;
+ } else if (event.type == PUGL_MAP && view->parent) {
+ XWindowAttributes attrs;
+ XGetWindowAttributes(view->impl->display, view->impl->win, &attrs);
+
+ const PuglEventConfigure configure = {
+ PUGL_CONFIGURE, 0, attrs.x, attrs.y, attrs.width, attrs.height};
+
+ puglDispatchEvent(view, (const PuglEvent*)&configure);
+ puglDispatchEvent(view, &event);
} else {
// Dispatch event to application immediately
puglDispatchEvent(view, &event);