diff options
author | Manuel Stoeckl <code@mstoeckl.com> | 2019-12-07 13:59:14 -0500 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-12-09 15:58:18 +0100 |
commit | 8a5e4768e1f8349ebbec815891185dbc4ea8e196 (patch) | |
tree | 429972db920910128311a186dd060b8977b32899 | |
parent | 6ca82087b1cbc3940e20df8fc14a73cf1e1eddc9 (diff) |
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).
-rw-r--r-- | types/wlr_output.c | 3 |
1 files changed, 3 insertions, 0 deletions
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; } } |