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/x11.c | |
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/x11.c')
-rw-r--r-- | src/x11.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -825,9 +825,9 @@ translatePropertyNotify(PuglView* const view, XPropertyEvent message) } } - if (hidden && view->visible) { + if (hidden && view->stage == PUGL_VIEW_STAGE_MAPPED) { event.type = PUGL_UNMAP; - } else if (!hidden && !view->visible) { + } else if (!hidden && view->stage == PUGL_VIEW_STAGE_CONFIGURED) { event.type = PUGL_MAP; } @@ -1353,7 +1353,7 @@ flushExposures(PuglWorld* const world) PuglView* const view = world->views[i]; // Send update event so the application can trigger redraws - if (view->visible) { + if (view->stage == PUGL_VIEW_STAGE_MAPPED) { puglDispatchSimpleEvent(view, PUGL_UPDATE); } @@ -1568,7 +1568,7 @@ puglPostRedisplayRect(PuglView* const view, const PuglRect rect) if (view->world->impl->dispatchingEvents) { // Currently dispatching events, add/expand expose for the loop end mergeExposeEvents(&view->impl->pendingExpose.expose, &event); - } else if (view->visible) { + } else if (view->stage == PUGL_VIEW_STAGE_MAPPED) { // Not dispatching events, send an X expose so we wake up next time PuglEvent exposeEvent = {{PUGL_EXPOSE, 0}}; exposeEvent.expose = event; |