diff options
author | David Robillard <d@drobilla.net> | 2023-01-11 14:26:47 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-01-11 14:27:09 -0500 |
commit | 1073ef1b714dfffd734898b48da27c9b023d4f89 (patch) | |
tree | 40b1e3726a54d83a98a54bc228f8a6ccebd33583 /src | |
parent | 8ade9137d3ccd70efa19b9e23a7083a49691066a (diff) | |
download | pugl-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.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |