mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 14:08:06 +01:00
Fix "smart" placement bug when there are shaded windows in other workspaces
Bug overview:
New windows are sometimes mis-placed when the "smart" algorithm is used.
How to reproduce it:
be sure (with WPrefs.app, for instance) to use the so-called "smart"
window placement algorithm. In an empty workspace, open a first window
(for instance, an xterm). The window should appear at the upper left corner.
Shade it (hide its contents below its title bar by double-clicking on it)
and select another empty workspace. Open another window. Instead of placing
it at the exact same place as the first window, wmaker places the new
window a little bit lower, or frankly to the right.
Explanation and correction:
when placing a new window, wmaker avoided all shaded windows, instead of
only avoiding the shaded windows on the active workspace.
This commit is contained in:
committed by
Carlos R. Mafra
parent
3f7110b120
commit
95a576bd62
@@ -308,8 +308,8 @@ static int calcSumOfCoveredAreas(WWindow * wwin, int x, int y, int w, int h)
|
||||
tx = test_window->frame_x;
|
||||
ty = test_window->frame_y;
|
||||
|
||||
if (test_window->flags.mapped ||
|
||||
(test_window->flags.shaded &&
|
||||
if (test_window->flags.mapped || (test_window->flags.shaded &&
|
||||
test_window->frame->workspace == wwin->screen_ptr->current_workspace &&
|
||||
!(test_window->flags.miniaturized || test_window->flags.hidden))) {
|
||||
sum_isect += calcIntersectionArea(tx, ty, tw, th, x, y, w, h);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user