diff options
author | David Robillard <d@drobilla.net> | 2019-07-20 20:51:11 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-20 21:44:20 +0200 |
commit | 5ba0ea7cd8cfec3f374f380a03e144e24f43a12c (patch) | |
tree | be12e2309a90cbba75c86c8cb629a913e50ff623 /pugl/pugl_x11.c | |
parent | 4d0704bae2d4eb2a292caabda91d654a17104501 (diff) | |
download | pugl-5ba0ea7cd8cfec3f374f380a03e144e24f43a12c.tar.gz pugl-5ba0ea7cd8cfec3f374f380a03e144e24f43a12c.tar.bz2 pugl-5ba0ea7cd8cfec3f374f380a03e144e24f43a12c.zip |
Remove redisplay flag and use system events instead
Diffstat (limited to 'pugl/pugl_x11.c')
-rw-r--r-- | pugl/pugl_x11.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/pugl/pugl_x11.c b/pugl/pugl_x11.c index 2d0dd76..d7db801 100644 --- a/pugl/pugl_x11.c +++ b/pugl/pugl_x11.c @@ -512,16 +512,6 @@ puglProcessEvents(PuglView* view) puglDispatchEvent(view, (const PuglEvent*)&config_event); } - if (view->redisplay) { - expose_event.expose.type = PUGL_EXPOSE; - expose_event.expose.view = view; - expose_event.expose.x = 0; - expose_event.expose.y = 0; - expose_event.expose.width = view->width; - expose_event.expose.height = view->height; - view->redisplay = false; - } - if (expose_event.type) { puglDispatchEvent(view, (const PuglEvent*)&expose_event); } @@ -540,7 +530,13 @@ puglGetTime(PuglView* view) void puglPostRedisplay(PuglView* view) { - view->redisplay = true; + XExposeEvent ev = {Expose, 0, True, + view->impl->display, view->impl->win, + 0, 0, + view->width, view->height, + 0}; + + XSendEvent(view->impl->display, view->impl->win, False, 0, (XEvent*)&ev); } PuglNativeWindow |