From 8a5e4768e1f8349ebbec815891185dbc4ea8e196 Mon Sep 17 00:00:00 2001 From: Manuel Stoeckl Date: Sat, 7 Dec 2019 13:59:14 -0500 Subject: [PATCH] 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). --- types/wlr_output.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wlr_output.c b/types/wlr_output.c index 22d9c588..ec29da4f 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -791,6 +791,9 @@ static void output_cursor_reset(struct wlr_output_cursor *cursor) { if (cursor->surface != NULL) { wl_list_remove(&cursor->surface_commit.link); wl_list_remove(&cursor->surface_destroy.link); + if (cursor->visible) { + wlr_surface_send_leave(cursor->surface, cursor->output); + } cursor->surface = NULL; } }