aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-12-17 15:11:53 -0500
committerDavid Robillard <d@drobilla.net>2021-12-17 15:11:53 -0500
commit73ef37a2b21b67680e16caf09c5a65185360b183 (patch)
treefa9a0c205df536fb36c226e454ae2e4bfa3382b7
parentee7078278c0aeb2a41149055ddab1e694f63232b (diff)
downloadpugl-73ef37a2b21b67680e16caf09c5a65185360b183.tar.gz
pugl-73ef37a2b21b67680e16caf09c5a65185360b183.tar.bz2
pugl-73ef37a2b21b67680e16caf09c5a65185360b183.zip
Reduce variable scope
-rw-r--r--src/x11.c4
1 files 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;