From f26f79f361eebb9af08ce64bc1c2f35b705e2927 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Fri, 31 Mar 2017 03:31:44 -0700 Subject: 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. --- src/screen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/screen.c') 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 -- cgit v1.2.3