swayfx/sway
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
..
commands Merge pull request #3423 from RyanDwyer/fullscreen-global 2019-01-27 18:06:50 -05:00
config Don't allow noop output to be configured 2019-01-22 09:55:13 +01:00
desktop Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
input Merge pull request #3423 from RyanDwyer/fullscreen-global 2019-01-27 18:06:50 -05:00
tree Center surface inside container when it's too small 2019-01-28 01:17:21 -05:00
commands.c Make json-c include respect pkg-config --cflags 2019-01-23 21:50:06 -05:00
config.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
criteria.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
debug-tree.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
decoration.c Fix double free when unmapping any view 2018-11-15 15:22:09 +10:00
ipc-json.c Implement fullscreen global 2019-01-25 08:29:21 +10:00
ipc-server.c Make json-c include respect pkg-config --cflags 2019-01-23 21:50:06 -05:00
main.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
meson.build meson: remove rpath options 2019-01-18 08:26:44 +01:00
security.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
server.c Use noop output when there's no outputs connected 2019-01-22 09:55:13 +01:00
sway-bar.5.scd Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
sway-input.5.scd Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
sway-output.5.scd Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
sway.1.scd Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
sway.5.scd Merge pull request #3423 from RyanDwyer/fullscreen-global 2019-01-27 18:06:50 -05:00
swaynag.c Replace wlr_log with sway_log 2019-01-21 12:59:42 +01:00
xdg_decoration.c Improve CSD logic 2018-09-27 22:51:37 +10:00