aboutsummaryrefslogtreecommitdiffstats
path: root/src/mac.m
diff options
context:
space:
mode:
Diffstat (limited to 'src/mac.m')
-rw-r--r--src/mac.m10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mac.m b/src/mac.m
index 5236d43..b8e30df 100644
--- a/src/mac.m
+++ b/src/mac.m
@@ -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