Just an initial implementation, I am not sure when I'll work on this again.
The alternative would have been to have it bitrot in a local dev branch so
I thought I may just as well post it as [wip] PR on here.
For anybody interested, feel free to use
this as a base or post an alternative PR.
Multiple issues that have to be fixed or verified:
- [ ] Interaction with various actions that resize the window or return
it into its natural geometry (e.g. unmaximize / untile)
- [ ] Maximize
- [ ] SnapToEdge
- [ ] SnapToRegion
- [ ] ResizeRelative
- [ ] GrowToEdge (once merged)
- [ ] Interaction with ToggleDecorations (and Reconfigure) is missing,
we should check `view->shaded` on ssd creation
- [ ] Not verified with xwayland windows at all
- [ ] The titlebar misses its top border as we disable the whole border tree
And the usual stuff missing:
- [ ] docs
- [ ] default mouse bindings?
Interactive resizing is completely disabled while in the shaded state.
Reason being that the actual client doesn't commit anything if it's
scene node is disabled. Moving the title bar around is fine though as
we don't need any confirmation from the client for that.
...and call actions after closing menus so that virtual keyboard input
caused by actions are sent to the surface with keyboard-focus rather
than being consumed by the open menu.
Fixes: #1366
Whenever the output layout changes, each view's original geometry will
be captured as last_layout_geometry (if it has not already been captured
by a previous layout change), which will remain valid unless the user
modifies the view's geometry (i.e., by tiling, maximizing, moving,
resizing or full-screening). On subsequent output layout changes, views
with valid last_layout_geometry will be back to their original position
if possible, or else to the closest possible output.
The view_adjust_floating_geometry function is called when un-maximizing
a window or changing the output layout to ensure that views are well
placed. Rather than always centering these views should they fall
offscren, use the automatic placement strategy if so configured.