summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-03-31 03:31:44 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-04-04 17:48:58 -0700
commitf26f79f361eebb9af08ce64bc1c2f35b705e2927 (patch)
tree91ba988a3075dfea64bd4a37be7f89f503911925 /src/screen.c
parent7a13afda4a51c28025eaae7789d8afb7e076d591 (diff)
window: drop configuring member from vwm_window_t
Rather than setting this configuring flag for the sake of vwm_screen_is_empty() to ignore, simply supply the xwin to ignore if desired.
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screen.c b/src/screen.c
index 1d082ad..3ee9540 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -137,16 +137,16 @@ _out:
/* check if a screen contains any windows (assuming the current desktop) */
-int vwm_screen_is_empty(vwm_t *vwm, const vwm_screen_t *scr)
+int vwm_screen_is_empty(vwm_t *vwm, const vwm_screen_t *scr, vwm_xwindow_t *ignore_xwin)
{
vwm_xwindow_t *xwin;
int is_empty = 1;
list_for_each_entry(xwin, &vwm->xwindows, xwindows) {
- if (!xwin->client_mapped)
+ if (xwin == ignore_xwin || !xwin->client_mapped)
continue;
- if (!xwin->managed || (xwin->managed->desktop == vwm->focused_desktop && !xwin->managed->shelved && !xwin->managed->configuring)) {
+ if (!xwin->managed || (xwin->managed->desktop == vwm->focused_desktop && !xwin->managed->shelved)) {
/* XXX: it may make more sense to see what %age of the screen is overlapped by windows, and consider it empty if < some % */
/* This is just seeing if any window is predominantly within the specified screen, the rationale being if you had a focusable
* window on the screen you would have used the keyboard to make windows go there; this function is only used in determining
© All Rights Reserved