output: fix cursor wl_surface.{enter,leave} tracking
This change ensures that wl_surface.leave is sent when a surface associated with the cursor is disassociated (when the cursor is reset).
This commit is contained in:
parent
6ca82087b1
commit
8a5e4768e1
|
@ -791,6 +791,9 @@ static void output_cursor_reset(struct wlr_output_cursor *cursor) {
|
||||||
if (cursor->surface != NULL) {
|
if (cursor->surface != NULL) {
|
||||||
wl_list_remove(&cursor->surface_commit.link);
|
wl_list_remove(&cursor->surface_commit.link);
|
||||||
wl_list_remove(&cursor->surface_destroy.link);
|
wl_list_remove(&cursor->surface_destroy.link);
|
||||||
|
if (cursor->visible) {
|
||||||
|
wlr_surface_send_leave(cursor->surface, cursor->output);
|
||||||
|
}
|
||||||
cursor->surface = NULL;
|
cursor->surface = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue