In order to restore an initially maximized window on Wayland, the compositor has to send a configure event with a width and a height of 0. But we currently cannot do it because the geometry restore is initialized to the first valid frame geometry. This is done because the geometry restore is used to send windows back to their original output in case it gets re-connected.
This change introduces a new component that is responsible for moving windows back to their original outputs. Thus the geometry restore no longer has to be initialized to the first valid frame geometry.
As a side-effect of this change, if you connect an output to the left, windows on other monitors won't shift. This is something that a lot of users complain about.
I tested this patch only on Wayland. Still need to check if there are any regressions on X11.