diff options
author | David Robillard <d@drobilla.net> | 2020-03-15 14:33:10 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-03-15 14:33:10 +0100 |
commit | 6cca4669d8afc3c92b1f1ecd5d40614f4c568ade (patch) | |
tree | ee619157ead0e2bc7bfdf4d7de05dd07a1f6e596 | |
parent | fb3baa801e449baa3dcee879557d94304dcd0509 (diff) |
X11: Only enter drawing context if an expose is pending
-rw-r--r-- | pugl/detail/x11.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c index 486e83b..7b83b38 100644 --- a/pugl/detail/x11.c +++ b/pugl/detail/x11.c @@ -814,10 +814,10 @@ puglDispatchEvents(PuglWorld* world) PuglEvent* const expose = &view->impl->pendingExpose; if (configure->type || expose->type) { - view->backend->enter(view, &expose->expose); + view->backend->enter(view, expose->type ? &expose->expose : NULL); view->eventFunc(view, configure); view->eventFunc(view, expose); - view->backend->leave(view, &expose->expose); + view->backend->leave(view, expose->type ? &expose->expose : NULL); configure->type = 0; expose->type = 0; |