window: Unmaximize window when moving it in a maximized direction
Maximizing a window along one axis and moving it currently does not result in the window unmaximizing.
This changes that behavior, the window is now unmaximized in this case.
Possibly fixes BUG: 482085 and BUG: 482086