Commit f6e7d2ce authored by Stefan Agner's avatar Stefan Agner Committed by Simon Ser

screen-share: destroy seat on remove

Destroy seats when they get removed. This makes sure that seats
properly disappear when screen-share RDP clients disconnect.
There will be no excessive amount of mouse pointer anymore after
several client connection/disconnections.
Signed-off-by: Stefan Agner's avatarStefan Agner <>
parent a784b475
Pipeline #50690 passed with stages
in 1 minute and 46 seconds
......@@ -87,6 +87,7 @@ struct ss_seat {
struct weston_seat base;
struct shared_output *output;
struct wl_list link;
uint32_t id;
struct {
struct wl_seat *seat;
......@@ -366,6 +367,7 @@ ss_seat_create(struct shared_output *so, uint32_t id)
weston_seat_init(&seat->base, so->output->compositor, "default");
seat->output = so;
seat->id = id;
seat-> = wl_registry_bind(so->parent.registry, id,
&wl_seat_interface, 1);
wl_list_insert(so->seat_list.prev, &seat->link);
......@@ -736,6 +738,12 @@ static void
registry_handle_global_remove(void *data, struct wl_registry *registry,
uint32_t name)
struct shared_output *so = data;
struct ss_seat *seat, *next;
wl_list_for_each_safe(seat, next, &so->seat_list, link)
if (seat->id == name)
static const struct wl_registry_listener registry_listener = {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment