diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2017-03-31 03:31:44 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2017-04-04 17:48:58 -0700 |
commit | f26f79f361eebb9af08ce64bc1c2f35b705e2927 (patch) | |
tree | 91ba988a3075dfea64bd4a37be7f89f503911925 /src/window.c | |
parent | 7a13afda4a51c28025eaae7789d8afb7e076d591 (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/window.c')
-rw-r--r-- | src/window.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 30622b8..144587e 100644 --- a/src/window.c +++ b/src/window.c @@ -410,18 +410,14 @@ static void vwm_win_assimilate(vwm_t *vwm, vwm_window_t *vwin) if (!vwin->shelved) { /* we place the window on the screen containing the the pointer only if that screen is empty, * otherwise we place windows on the screen containing the currently focused window */ - /* since we query the geometry of windows in determining where to place them, a configuring - * flag is used to exclude the window being configured from those queries */ scr = vwm_screen_find(vwm, VWM_SCREEN_REL_POINTER); - vwin->configuring = 1; - if (vwm_screen_is_empty(vwm, scr)) { + if (vwm_screen_is_empty(vwm, scr, vwin->xwindow)) { /* focus the new window if it isn't already focused when it's going to an empty screen */ VWM_TRACE("window \"%s\" is alone on screen \"%i\", focusing", vwin->xwindow->name, scr->screen_number); vwm_win_focus(vwm, vwin); } else { scr = vwm_screen_find(vwm, VWM_SCREEN_REL_XWIN, vwm->focused_desktop->focused_window->xwindow); } - vwin->configuring = 0; changes.x = scr->x_org; changes.y = scr->y_org; |