From aa8d2e487b887e446df873c50f3c148d95104613 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 23 Jan 2025 09:08:43 -0500 Subject: Simplify some conditionals --- src/x11.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/x11.c b/src/x11.c index 8c388a7..6b45fd4 100644 --- a/src/x11.c +++ b/src/x11.c @@ -1522,7 +1522,7 @@ static void mergeExposeEvents(PuglExposeEvent* const dst, const PuglExposeEvent* const src) { if (!dst->type) { - if (src->width > 0.0 && src->height > 0.0) { + if (src->width && src->height) { *dst = *src; } } else { @@ -1843,8 +1843,9 @@ puglUpdate(PuglWorld* const world, const double timeout) world->impl->dispatchingEvents = true; if (timeout < 0.0) { - st0 = pollX11Socket(world, timeout); - st0 = st0 ? st0 : dispatchX11Events(world); + if (!(st0 = pollX11Socket(world, timeout))) { + st0 = dispatchX11Events(world); + } } else if (timeout <= 0.001) { st0 = dispatchX11Events(world); } else { -- cgit v1.2.1