aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11_cairo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/x11_cairo.c')
-rw-r--r--src/x11_cairo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/x11_cairo.c b/src/x11_cairo.c
index d6fbaec..ff0b154 100644
--- a/src/x11_cairo.c
+++ b/src/x11_cairo.c
@@ -19,10 +19,10 @@ typedef struct {
cairo_t* cr;
} PuglX11CairoSurface;
-static PuglViewSize
+static PuglArea
puglX11CairoGetViewSize(const PuglView* const view)
{
- PuglViewSize size = {0U, 0U};
+ PuglArea size = {0U, 0U};
if (view->lastConfigure.type == PUGL_CONFIGURE) {
// Use the size of the last configured frame
@@ -97,11 +97,11 @@ puglX11CairoEnter(PuglView* view, const PuglExposeEvent* expose)
PuglStatus st = PUGL_SUCCESS;
if (expose) {
- const PuglViewSize viewSize = puglX11CairoGetViewSize(view);
- const PuglSpan right = (PuglSpan)(expose->x + expose->width);
- const PuglSpan bottom = (PuglSpan)(expose->y + expose->height);
- const PuglSpan surfaceWidth = MAX(right, viewSize.width);
- const PuglSpan surfaceHeight = MAX(bottom, viewSize.height);
+ const PuglArea viewSize = puglX11CairoGetViewSize(view);
+ const PuglSpan right = (PuglSpan)(expose->x + expose->width);
+ const PuglSpan bottom = (PuglSpan)(expose->y + expose->height);
+ const PuglSpan surfaceWidth = MAX(right, viewSize.width);
+ const PuglSpan surfaceHeight = MAX(bottom, viewSize.height);
if (!(st = puglX11CairoOpen(view, surfaceWidth, surfaceHeight))) {
surface->cr = cairo_create(surface->front);
if (cairo_status(surface->cr)) {