Maximized windows appear misplaced
commitb657f15344f193d70747689f96cefddc8baa2181
authorIain Patterson <wm@iain.cx>
Fri, 9 Nov 2012 22:39:57 +0000 (9 14:39 -0800)
committerCarlos R. Mafra <crmafra@gmail.com>
Fri, 9 Nov 2012 23:35:16 +0000 (9 23:35 +0000)
treeb67d15c7b5c574f1099e97f495c0f936aae87269
parentfd9bb936aa9379c27ba3bbf0c1fdb6c0ed1626cc
Maximized windows appear misplaced

Bug report from nikty:

"Window Maker does remember the size of windows, but for maximized windows it does not keep the position.
When a maximized window appears it is shifted to the right for a few pixels (firefox, thunar) or both to the right and to the bottom (openoffice, vlc, virtualbox)."

We weren't accounting for the window border when calculating whether the window would position correctly.

To reproduce:

  * Launch some application which remembers its position.  I used
    Thunar as suggested in the bug report.

  * Maximize!

  * Kill the application.

  * Launch it again.

  * Maximize!  The expected behaviour is that nothing would happen
    because the window should have started right where it was before.
    Observed behaviour is that it moves a few pixels.

After the patch we can verify that the maximize operation is
idempotent with regards to geometry.

Tested with and without Xinerama, with and without a panel strutting
one edge.

Bug report: http://www.kix.es/mantis/view.php?id=4
src/window.c