summaryrefslogtreecommitdiffstats
path: root/sway/commands/move.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-19 11:01:51 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-08-20 09:23:24 +1000
commit0f6d212629964c6a131b5675fa6c9f4d48da43aa (patch)
tree2dec4ff1e44ede939eb01927425c5da61e41ab5e /sway/commands/move.c
parentMerge pull request #2493 from RyanDwyer/fix-popup-position (diff)
downloadsway-0f6d212629964c6a131b5675fa6c9f4d48da43aa.tar.gz
sway-0f6d212629964c6a131b5675fa6c9f4d48da43aa.tar.zst
sway-0f6d212629964c6a131b5675fa6c9f4d48da43aa.zip
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
Diffstat (limited to 'sway/commands/move.c')
-rw-r--r--sway/commands/move.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/sway/commands/move.c b/sway/commands/move.c
index e788d32f..c6dc0775 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -236,7 +236,6 @@ static void workspace_move_to_output(struct sway_container *workspace,
236 seat_get_focus_inactive(seat, output); 236 seat_get_focus_inactive(seat, output);
237 237
238 container_add_child(output, workspace); 238 container_add_child(output, workspace);
239 wl_signal_emit(&workspace->events.reparent, old_output);
240 239
241 // If moving the last workspace from the old output, create a new workspace 240 // If moving the last workspace from the old output, create a new workspace
242 // on the old output 241 // on the old output