summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/screen.c b/src/screen.c
index 32a0fc7..4449fb5 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -169,23 +169,20 @@ _out:
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 == ignore_xwin || !xwin->client_mapped)
continue;
- if (!xwin->managed || (xwin->managed->desktop == vwm->focused_desktop && !xwin->managed->shelved)) {
+ if (!xwin->managed || xwin->managed->desktop == vwm->focused_desktop) {
/* 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
* wether a new window should go where the pointer is or not. */
- if (vwm_screen_overlaps_xwin(vwm, scr, xwin) >= 0.05) {
- is_empty = 0;
- break;
- }
+ if (vwm_screen_overlaps_xwin(vwm, scr, xwin) >= 0.05)
+ return 0;
}
}
- return is_empty;
+ return 1;
}
© All Rights Reserved