More (un)maximize tweaks.
commit81eefca4ef70414d73048300058e5007f402dd7f
authorIain Patterson <wm@iain.cx>
Tue, 26 Jun 2012 15:20:43 +0000 (26 16:20 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 26 Jun 2012 15:56:20 +0000 (26 16:56 +0100)
tree0d5960735dda5063e664fb6c8b38086e67e77f34
parent8edb9dad810420e638d2c774957d1fd23ec7257e
More (un)maximize tweaks.

Update the saved X co-ordinate of a window which was moved when
maximized (only) vertically so that unmaximizing the window restores
its dimensions without warping it back to its previous X position.
Similarly update the saved Y co-ordinate of a window which was
moved when maximized (only) horizontally.

Handle Maximus as a special case.  We remember the Maximusized X and Y
co-ordinates then adjust the restored co-ordinates relative to the
delta between the window's position just after Maximusizing and its
position just before restoring.  So for example if a window is
Maximusized, moved 100 pixels to the left and restored, it will end
up 100 pixels left of its original geometry.

Also fix "jumping window" bug reported by Christian Wittmer:

This "jumping window" happens only when you
1) open new xterm (STRG +n)
2) current position is (+64, +0)
3) maximize window vertically
4) undo maximizing
5) move window to the right or left (up or down as you like)
I moved right to (+450, +0)
6) maximize vertically again
7) and undo maximizing
8) window jumps back to (+64, ..) position

If you move a new opened window to a new position (e.g. +200, +200)
and then start with "3)". window is jumping back "+200, +200"
src/actions.c
src/actions.h
src/moveres.c
src/window.h