aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/detail/x11.c')
-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);