diff options
author | David Robillard <d@drobilla.net> | 2023-01-07 19:27:00 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-07 19:27:00 -0500 |
commit | 28631e2b202e661084039464f45228b9ce323a8f (patch) | |
tree | 6b8d7f586052093e3d47e33d6db04f71406c1bdb /src/mac.m | |
parent | b6ecd23cfb3c82c2c3f05795ebd9c65314e6367c (diff) | |
download | pugl-28631e2b202e661084039464f45228b9ce323a8f.tar.gz pugl-28631e2b202e661084039464f45228b9ce323a8f.tar.bz2 pugl-28631e2b202e661084039464f45228b9ce323a8f.zip |
Replace visible flag with a more descriptive view "stage"
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 |