diff options
author | David Robillard <d@drobilla.net> | 2020-03-16 16:13:54 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-16 16:13:54 +0100 |
commit | 30803f50fafbe9d86dafa74854dcaeee30195f29 (patch) | |
tree | 8a47e3cdfa4f9669a591a545dcaf9d27c8ae0de1 | |
parent | 67a348548f34d9d2a75ee886002d4fd839988044 (diff) |
MacOS: Move initial configure to just before map
-rw-r--r-- | pugl/detail/mac.m | 21 |
1 files changed, 10 insertions, 11 deletions
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; } |