mirror of
https://github.com/labwc/labwc.git
synced 2026-03-19 05:33:53 -04:00
overlay: add snap-to-edge overlay (PR #1652)
...and unify region overlay and snap-to-edge overlay into overlay.c. Snap-to-edge overlay is delayed for 500ms to prevent flickering when the view is dragged from an output to another (demo in discussion labwc#1613). This also fixes a bug that region overlay is not shown when a modifier key is re-pressed.
This commit is contained in:
parent
67669dcf1e
commit
5cc0757390
16 changed files with 361 additions and 152 deletions
|
|
@ -102,13 +102,17 @@ static void
|
|||
output_destroy_notify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct output *output = wl_container_of(listener, output, destroy);
|
||||
struct seat *seat = &output->server->seat;
|
||||
regions_evacuate_output(output);
|
||||
regions_destroy(&output->server->seat, &output->regions);
|
||||
regions_destroy(seat, &output->regions);
|
||||
if (seat->overlay.active.output == output) {
|
||||
overlay_hide(seat);
|
||||
}
|
||||
wl_list_remove(&output->link);
|
||||
wl_list_remove(&output->frame.link);
|
||||
wl_list_remove(&output->destroy.link);
|
||||
wl_list_remove(&output->request_state.link);
|
||||
seat_output_layout_changed(&output->server->seat);
|
||||
seat_output_layout_changed(seat);
|
||||
|
||||
for (size_t i = 0; i < ARRAY_SIZE(output->layer_tree); i++) {
|
||||
wlr_scene_node_destroy(&output->layer_tree[i]->node);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue