aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-01-11 14:26:47 -0500
committerDavid Robillard <d@drobilla.net>2023-01-11 14:27:09 -0500
commit1073ef1b714dfffd734898b48da27c9b023d4f89 (patch)
tree40b1e3726a54d83a98a54bc228f8a6ccebd33583 /src
parent8ade9137d3ccd70efa19b9e23a7083a49691066a (diff)
downloadpugl-1073ef1b714dfffd734898b48da27c9b023d4f89.tar.gz
pugl-1073ef1b714dfffd734898b48da27c9b023d4f89.tar.bz2
pugl-1073ef1b714dfffd734898b48da27c9b023d4f89.zip
X11: Fix puglPostRedisplay() outside of event handlers
Diffstat (limited to 'src')
-rw-r--r--src/x11.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/x11.c b/src/x11.c
index 2872612..54fc6d1 100644
--- a/src/x11.c
+++ b/src/x11.c
@@ -739,7 +739,9 @@ puglShow(PuglView* const view, const PuglShowCommand command)
break;
}
- st = puglPostRedisplay(view);
+ if (view->stage == PUGL_VIEW_STAGE_CONFIGURED) {
+ st = puglPostRedisplay(view);
+ }
}
return st;
@@ -1863,7 +1865,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->stage == PUGL_VIEW_STAGE_CONFIGURED) {
+ } else if (view->impl->win) {
// Not dispatching events, send an X expose so we wake up next time
PuglEvent exposeEvent = {{PUGL_EXPOSE, 0}};
exposeEvent.expose = event;