From f1697241be39550bb873b695a73f0663f084ab7d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 30 Jun 2019 20:07:13 +0200 Subject: Send a configure event on initial window mapping --- pugl/pugl_x11.c | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- cgit v1.2.1