aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-06-30 20:07:13 +0200
committerDavid Robillard <d@drobilla.net>2019-06-30 20:13:25 +0200
commitf1697241be39550bb873b695a73f0663f084ab7d (patch)
treebdeb129c2f93a7e7634f3c74a60ecc99aeb438b3
parent0497e8e5e76066300f717c9e07b36b7364fc28f6 (diff)
Send a configure event on initial window mapping
-rw-r--r--pugl/pugl_x11.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index b6ec603..47a5738 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -309,6 +309,16 @@ translateEvent(PuglView* view, XEvent xevent)
}
break;
}
+ case MapNotify: {
+ XWindowAttributes attrs = {0};
+ XGetWindowAttributes(view->impl->display, view->impl->win, &attrs);
+ event.type = PUGL_CONFIGURE;
+ event.configure.x = attrs.x;
+ event.configure.y = attrs.y;
+ event.configure.width = attrs.width;
+ event.configure.height = attrs.height;
+ break;
+ }
case ConfigureNotify:
event.type = PUGL_CONFIGURE;
event.configure.x = xevent.xconfigure.x;