From 73ef37a2b21b67680e16caf09c5a65185360b183 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 17 Dec 2021 15:11:53 -0500 Subject: Reduce variable scope --- src/x11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/x11.c b/src/x11.c index 523e5b5..81a91b1 100644 --- a/src/x11.c +++ b/src/x11.c @@ -608,8 +608,7 @@ translatePropertyNotify(PuglView* const view, XPropertyEvent message) { const PuglX11Atoms* const atoms = &view->world->impl->atoms; - PuglEvent event = {{PUGL_NOTHING, 0}}; - bool hidden = false; + PuglEvent event = {{PUGL_NOTHING, 0}}; if (message.atom == atoms->NET_WM_STATE) { unsigned long numHints = 0; Atom* hints = NULL; @@ -618,6 +617,7 @@ translatePropertyNotify(PuglView* const view, XPropertyEvent message) return event; } + bool hidden = false; for (unsigned long i = 0; i < numHints; ++i) { if (hints[i] == atoms->NET_WM_STATE_HIDDEN) { hidden = true; -- cgit v1.2.1