diff options
Diffstat (limited to 'src/mac.m')
-rw-r--r-- | src/mac.m | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -213,7 +213,9 @@ updateViewRect(PuglView* view) - (void)setIsVisible:(BOOL)flag { - if (flag && !puglview->visible) { + [super setIsVisible:flag]; + + if (flag && puglview->stage < PUGL_VIEW_STAGE_MAPPED) { const PuglConfigureEvent ev = { PUGL_CONFIGURE, 0, @@ -227,13 +229,9 @@ updateViewRect(PuglView* view) configureEvent.configure = ev; puglDispatchEvent(puglview, &configureEvent); puglDispatchSimpleEvent(puglview, PUGL_MAP); - } else if (!flag && puglview->visible) { + } else if (!flag && puglview->stage == PUGL_VIEW_STAGE_MAPPED) { puglDispatchSimpleEvent(puglview, PUGL_UNMAP); } - - puglview->visible = flag; - - [super setIsVisible:flag]; } @end |