sway-patched-tray-menu/sway/desktop
Ryan Dwyer 0a9ff774ad Center surface inside container when it's too small
The goal here is to center fullscreen views when they are both too small
for the output and refuse to resize to the output's dimensions. It has
the side effect of also centering the view when it's too small for its
container.

Example clients that have this behaviour are emersion's hello-wayland
and weston.

It works by introducing surface_{x,y,width,height} properties to the
container struct. The x and y represent layout-local coordinates where
the surface will be rendered. The width and height are only used to
track the surface's previous dimensions so we can detect when the client
has resized it and recenter and apply damage accordingly.

The new surface properties are calculated when a transaction is applied,
as well as when a view resizes itself unexpectedly. The latter is done
in view_update_size. This function was previously restricted to views
which are floating, but can now be called for any views.

For views which refuse to resize *smaller* than a particular size, such
as gnome-calculator, the surface is still anchored to the top left as
per the current behaviour.
2019-01-28 01:17:21 -05:00
..
desktop.c Move view {x,y,width,height} into container struct 2018-11-17 21:29:42 +10:00
idle_inhibit_v1.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
layer_shell.c Fix dead stores found by scan-build 2019-01-22 10:12:04 -05:00
output.c Implement fullscreen global 2019-01-25 08:29:21 +10:00
render.c Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
transaction.c Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
xdg_shell.c Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
xdg_shell_v6.c Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
xwayland.c Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00