From dd0b921970c2024dc1de72b5b522884f0a2e7e52 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 24 May 2021 16:22:47 -0400 Subject: Shrink code --- src/x11_cairo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/x11_cairo.c') diff --git a/src/x11_cairo.c b/src/x11_cairo.c index d562fc5..fa05bd1 100644 --- a/src/x11_cairo.c +++ b/src/x11_cairo.c @@ -101,10 +101,7 @@ puglX11CairoEnter(PuglView* view, const PuglEventExpose* expose) if (expose && !(st = puglX11CairoOpen(view))) { surface->cr = cairo_create(surface->front); - - if (cairo_status(surface->cr)) { - st = PUGL_CREATE_CONTEXT_FAILED; - } + st = cairo_status(surface->cr) ? PUGL_CREATE_CONTEXT_FAILED : PUGL_SUCCESS; } return st; -- cgit v1.2.1