aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/x11_cairo.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-02-18 22:50:52 +0100
committerDavid Robillard <d@drobilla.net>2020-02-18 23:20:02 +0100
commit0059c630d7406f672c113d6dc6da78810160ddbb (patch)
tree789ede3ed59b6301245b823654e31662adeda726 /pugl/detail/x11_cairo.c
parent2bae8905a97aa8a29826c78311c826d61f075e0e (diff)
downloadpugl-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_cairo.c')
-rw-r--r--pugl/detail/x11_cairo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pugl/detail/x11_cairo.c b/pugl/detail/x11_cairo.c
index 9d3ec16..7a02dcd 100644
--- a/pugl/detail/x11_cairo.c
+++ b/pugl/detail/x11_cairo.c
@@ -79,12 +79,12 @@ puglX11CairoDestroy(PuglView* view)
}
static PuglStatus
-puglX11CairoEnter(PuglView* view, bool drawing)
+puglX11CairoEnter(PuglView* view, const PuglEventExpose* expose)
{
PuglInternals* const impl = view->impl;
PuglX11CairoSurface* const surface = (PuglX11CairoSurface*)impl->surface;
- if (drawing) {
+ if (expose) {
surface->cr = cairo_create(surface->front);
if (!surface->cr || cairo_status(surface->cr)) {
return PUGL_CREATE_CONTEXT_FAILED;
@@ -95,12 +95,12 @@ puglX11CairoEnter(PuglView* view, bool drawing)
}
static PuglStatus
-puglX11CairoLeave(PuglView* view, bool drawing)
+puglX11CairoLeave(PuglView* view, const PuglEventExpose* expose)
{
PuglInternals* const impl = view->impl;
PuglX11CairoSurface* const surface = (PuglX11CairoSurface*)impl->surface;
- if (drawing) {
+ if (expose) {
// Destroy front context that was used by the user for drawing
cairo_destroy(surface->cr);