Skip to content

Commit

Permalink
Fix over-eager window positioning
Browse files Browse the repository at this point in the history
When calculating if a window is on a page, ensure its position is less
than the overall height/width of the screen, and not equal to it.  This
would otherwise mean that maximized windows would be taken into account
when in fact they're on a separate page entirely.

Fixes #443
  • Loading branch information
ThomasAdam committed Feb 23, 2021
1 parent 89508d8 commit 6a6e449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fvwm/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ Bool IsRectangleOnThisPage(struct monitor *m, const rectangle *rec, int desk)

//if (m->virtual_scr.CurrentDesk == desk &&
if (rec->x + (signed int)rec->width > 0 &&
(rec->x < 0 || rec->x <= m->virtual_scr.MyDisplayWidth) &&
(rec->x < 0 || rec->x < m->virtual_scr.MyDisplayWidth) &&
rec->y + (signed int)rec->height > 0 &&
(rec->y < 0 || rec->y <= m->virtual_scr.MyDisplayHeight)) {
(rec->y < 0 || rec->y < m->virtual_scr.MyDisplayHeight)) {
return (True);
}
return (False);
Expand Down

0 comments on commit 6a6e449

Please sign in to comment.