swayfx/sway
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
..
commands Send output enter/leave events correctly 2018-08-20 09:23:24 +10:00
config Allow a fallback color to be specified for swaybg 2018-08-08 15:37:06 -04:00
desktop Send output enter/leave events correctly 2018-08-20 09:23:24 +10:00
input Replace hacky L_FLOATING container with a list 2018-08-19 16:18:33 +10:00
tree Send output enter/leave events correctly 2018-08-20 09:23:24 +10:00
base64.c Rework get_clipboard implementation 2017-07-07 21:51:34 +02:00
commands.c commands: add nop 2018-08-18 15:50:26 +01:00
config.c Implement iterators per container type 2018-08-18 23:38:54 +10:00
criteria.c Implement iterators per container type 2018-08-18 23:38:54 +10:00
debug-tree.c Merge pull request #2478 from RyanDwyer/standardise-debug 2018-08-19 10:29:29 -04:00
decoration.c Handle views created after decoration mode is sent for xdg-shell 2018-08-06 15:20:30 +01:00
ipc-json.c Replace hacky L_FLOATING container with a list 2018-08-19 16:18:33 +10:00
ipc-server.c Implement iterators per container type 2018-08-18 23:38:54 +10:00
main.c Use enum for damage debug options 2018-08-19 16:17:24 +10:00
meson.build commands: add nop 2018-08-18 15:50:26 +01:00
security.c Add minimal config subsystem 2017-12-05 10:40:55 +01:00
server.c Standardise debug variables 2018-08-19 16:17:24 +10:00
sway-bar.5.scd Add sway-bar(5) 2018-05-11 21:13:43 -04:00
sway-input.5.scd Escaping underscores in tap_button_map 2018-07-29 14:47:53 +02:00
sway.1.scd delete references to swaygrab 2018-07-30 16:24:46 +01:00
sway.5.scd commands: complete assign command 2018-08-18 17:25:06 +01:00
swaynag.c Fix compiler errors. 2018-08-05 00:24:44 -07:00