diff options
author | David Robillard <d@drobilla.net> | 2021-12-17 15:11:53 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2021-12-17 15:11:53 -0500 |
commit | 73ef37a2b21b67680e16caf09c5a65185360b183 (patch) | |
tree | fa9a0c205df536fb36c226e454ae2e4bfa3382b7 | |
parent | ee7078278c0aeb2a41149055ddab1e694f63232b (diff) | |
download | pugl-73ef37a2b21b67680e16caf09c5a65185360b183.tar.gz pugl-73ef37a2b21b67680e16caf09c5a65185360b183.tar.bz2 pugl-73ef37a2b21b67680e16caf09c5a65185360b183.zip |
Reduce variable scope
-rw-r--r-- | src/x11.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |