From 6cca4669d8afc3c92b1f1ecd5d40614f4c568ade Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 15 Mar 2020 14:33:10 +0100 Subject: X11: Only enter drawing context if an expose is pending --- pugl/detail/x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pugl/detail') 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; -- cgit v1.2.1