From 30803f50fafbe9d86dafa74854dcaeee30195f29 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Mar 2020 16:13:54 +0100 Subject: MacOS: Move initial configure to just before map --- pugl/detail/mac.m | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'pugl/detail') diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m index 6b02c75..fcf5912 100644 --- a/pugl/detail/mac.m +++ b/pugl/detail/mac.m @@ -101,6 +101,16 @@ updateViewRect(PuglView* view) - (void) setIsVisible:(BOOL)flag { if (flag && !puglview->visible) { + const PuglEventConfigure ev = { + PUGL_CONFIGURE, + 0, + puglview->frame.x, + puglview->frame.y, + puglview->frame.width, + puglview->frame.height, + }; + + puglDispatchEvent(puglview, (const PuglEvent*)&ev); puglDispatchSimpleEvent(puglview, PUGL_MAP); } else if (!flag && puglview->visible) { puglDispatchSimpleEvent(puglview, PUGL_UNMAP); @@ -830,17 +840,6 @@ puglCreateWindow(PuglView* view, const char* title) puglDispatchSimpleEvent(view, PUGL_CREATE); - const PuglEventConfigure ev = { - PUGL_CONFIGURE, - 0, - view->frame.x, - view->frame.y, - view->frame.width, - view->frame.height, - }; - - puglDispatchEvent(view, (const PuglEvent*)&ev); - return 0; } -- cgit v1.2.1