diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-12 13:11:40 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-03-14 19:41:48 -0700 |
commit | bc04055653fe64c4e8e109beedf96dd608007a3b (patch) | |
tree | aaf60b45a56f9d5765f6dcf6afa89bd62b9d46e2 /src/context.c | |
parent | 2373a54d2d52961a841dace71b505d2c20f5c040 (diff) |
*: trivial code formatting cleanups
I'm no longer fond of combining one-line conditional statements on
the same line as their conditional expression.
Diffstat (limited to 'src/context.c')
-rw-r--r-- | src/context.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/context.c b/src/context.c index 70494cf..2e41a7c 100644 --- a/src/context.c +++ b/src/context.c @@ -35,7 +35,8 @@ int vwm_context_focus(vwm_t *vwm, vwm_context_t desired_context) vwm_window_t *vwin; case VWM_CONTEXT_SHELF: - if (desired_context == VWM_CONTEXT_SHELF) break; + if (desired_context == VWM_CONTEXT_SHELF) + break; /* desired == DESKTOP && focused == SHELF */ @@ -45,7 +46,9 @@ int vwm_context_focus(vwm_t *vwm, vwm_context_t desired_context) /* map the focused desktop, from the top of the stack down */ list_for_each_entry_prev(xwin, &vwm->xwindows, xwindows) { - if (!(vwin = xwin->managed)) continue; + if (!(vwin = xwin->managed)) + continue; + if (vwin->desktop == vwm->focused_desktop && !vwin->shelved) { VWM_TRACE("Mapping desktop window \"%s\"", xwin->name); vwm_win_map(vwm, vwin); @@ -62,7 +65,8 @@ int vwm_context_focus(vwm_t *vwm, vwm_context_t desired_context) case VWM_CONTEXT_DESKTOP: /* unmap everything, map the shelf */ - if (desired_context == VWM_CONTEXT_DESKTOP) break; + if (desired_context == VWM_CONTEXT_DESKTOP) + break; /* desired == SHELF && focused == DESKTOP */ @@ -70,7 +74,9 @@ int vwm_context_focus(vwm_t *vwm, vwm_context_t desired_context) if (vwm->focused_shelf) { /* unmap everything on the current desktop */ list_for_each_entry(xwin, &vwm->xwindows, xwindows) { - if (!(vwin = xwin->managed)) continue; + if (!(vwin = xwin->managed)) + continue; + if (vwin->desktop == vwm->focused_desktop) { VWM_TRACE("Unmapping desktop window \"%s\"", xwin->name); vwm_win_unmap(vwm, vwin); |