mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-20 06:50:04 +01:00
tablet-v2: cleanup focused surface on tool destroy
Currently the surface_destroy listener may not get removed if destroy_tablet_tool_v2() is called while the tool is in proximity to a surface. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3969 Reported-by: Hooman Ise
This commit is contained in:
parent
648aee65ad
commit
7dd8fdf76c
1 changed files with 3 additions and 0 deletions
|
|
@ -103,7 +103,10 @@ void destroy_tablet_tool_v2(struct wl_resource *resource) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (client->tool && client->tool->current_client == client) {
|
if (client->tool && client->tool->current_client == client) {
|
||||||
|
wl_list_remove(&client->tool->surface_destroy.link);
|
||||||
|
wl_list_init(&client->tool->surface_destroy.link);
|
||||||
client->tool->current_client = NULL;
|
client->tool->current_client = NULL;
|
||||||
|
client->tool->focused_surface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wl_list_remove(&client->seat_link);
|
wl_list_remove(&client->seat_link);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue