summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-09-13 15:37:00 -0400
committerDavid Robillard <d@drobilla.net>2015-09-13 15:37:00 -0400
commit77d1640d8a704a124b4ad0f953687f6bc65893b8 (patch)
tree83212becf25eec088be9b8c221123bbacf247f56
parent6e26c05d999af1ff47ce80d95dcb03f2c63ab380 (diff)
Avoid redundant expose events on resize.
-rw-r--r--pugl/pugl_x11.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c
index 43a1b26..8167ece 100644
--- a/pugl/pugl_x11.c
+++ b/pugl/pugl_x11.c
@@ -545,11 +545,14 @@ puglProcessEvents(PuglView* view)
cairo_xlib_surface_set_size(view->impl->surface,
event.configure.width,
event.configure.height);
+ view->redisplay = true;
}
#endif
// Dispatch event to application
- puglDispatchEvent(view, &event);
+ if (!(view->redisplay && event.type == PUGL_EXPOSE)) {
+ puglDispatchEvent(view, &event);
+ }
}
if (view->redisplay) {