diff options
Diffstat (limited to 'pugl')
-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; } |