aboutsummaryrefslogtreecommitdiffstats
path: root/src/x11.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-01-23 09:08:43 -0500
committerDavid Robillard <d@drobilla.net>2025-01-23 16:59:52 -0500
commitaa8d2e487b887e446df873c50f3c148d95104613 (patch)
treedb0c4aaba56f21ba89baefb7f45d49e3f94022ff /src/x11.c
parentd7b69ead8e7e959b01cf615c5f363fd2a0a6590f (diff)
downloadpugl-aa8d2e487b887e446df873c50f3c148d95104613.tar.gz
pugl-aa8d2e487b887e446df873c50f3c148d95104613.tar.bz2
pugl-aa8d2e487b887e446df873c50f3c148d95104613.zip
Simplify some conditionals
Diffstat (limited to 'src/x11.c')
-rw-r--r--src/x11.c7
1 files changed, 4 insertions, 3 deletions
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 {