swayfx/sway/desktop
Ryan Dwyer 0f6d212629 Send output enter/leave events correctly
Previously we used a reparent event to detect when a view changes
parent, then sent an output enter/leave to the surfaces if needed. This
worked for tiling views but not floating views, as floating views can
intersect another output without changing parent.

The solution implemented for floating views also applies cleanly to
tiling views, so the previous method has been completely replaced and
the reparent event has been removed.

This introduces a new function container_discover_outputs. This function
compares the container's `current` position to the outputs, sends enter
and leave events as needed, and keeps track of which outputs it's
intersecting in a new `container->outputs` list. If it has entered a new
output with a different scale then the title and marks textures will
also be recreated at the new scale.

The function is called when a transaction applies. This is convenient as
it means we don't have to call it from various places.

There is imperfect rendering when a floating view overlaps two outputs
with different scales. It renders correctly for the most recently
entered output, but there is only one title texture so it renders
incorrectly on the old output.

Fixes #2482
2018-08-20 09:23:24 +10:00
..
desktop.c Store geometry in the view and handle any floating view resizing 2018-08-18 15:10:06 +10:00
idle_inhibit_v1.c Fix memory leak in sway/desktop/idle_inhibit_v1.c 2018-07-17 11:35:24 -04:00
layer_shell.c Address first round review for swaynag 2018-08-01 22:47:54 -04:00
output.c Fix popup position when parent uses geometry 2018-08-19 21:09:39 +10:00
render.c Merge pull request #2478 from RyanDwyer/standardise-debug 2018-08-19 10:29:29 -04:00
transaction.c Send output enter/leave events correctly 2018-08-20 09:23:24 +10:00
xdg_shell.c Store geometry in the view and handle any floating view resizing 2018-08-18 15:10:06 +10:00
xdg_shell_v6.c Store geometry in the view and handle any floating view resizing 2018-08-18 15:10:06 +10:00
xwayland.c Store geometry in the view and handle any floating view resizing 2018-08-18 15:10:06 +10:00