diff options
author | David Robillard <d@drobilla.net> | 2020-02-18 22:50:52 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-02-18 23:20:02 +0100 |
commit | 0059c630d7406f672c113d6dc6da78810160ddbb (patch) | |
tree | 789ede3ed59b6301245b823654e31662adeda726 /pugl/detail/x11_gl.c | |
parent | 2bae8905a97aa8a29826c78311c826d61f075e0e (diff) | |
download | pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.gz pugl-0059c630d7406f672c113d6dc6da78810160ddbb.tar.bz2 pugl-0059c630d7406f672c113d6dc6da78810160ddbb.zip |
Pass expose event to backend enter and leave functions
This is needed for clipping. Unfortunately, the puglEnterContext() and
puglLeaveContext() API was not suitable for this, but this shouldn't matter in
user code because it is only used for setup, and is slated for removal anyway.
Instead, just call the backend functions directly in the implementation.
Diffstat (limited to 'pugl/detail/x11_gl.c')
-rw-r--r-- | pugl/detail/x11_gl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pugl/detail/x11_gl.c b/pugl/detail/x11_gl.c index d325f9d..d3807f2 100644 --- a/pugl/detail/x11_gl.c +++ b/pugl/detail/x11_gl.c @@ -165,7 +165,7 @@ puglX11GlDestroy(PuglView* view) } static PuglStatus -puglX11GlEnter(PuglView* view, bool PUGL_UNUSED(drawing)) +puglX11GlEnter(PuglView* view, const PuglEventExpose* PUGL_UNUSED(expose)) { PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx); @@ -173,11 +173,11 @@ puglX11GlEnter(PuglView* view, bool PUGL_UNUSED(drawing)) } static PuglStatus -puglX11GlLeave(PuglView* view, bool drawing) +puglX11GlLeave(PuglView* view, const PuglEventExpose* expose) { PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; - if (drawing && surface->double_buffered) { + if (expose && surface->double_buffered) { glXSwapBuffers(view->impl->display, view->impl->win); } |