From ab74d726c6c1ec0515a70c248731090a191efbd1 Mon Sep 17 00:00:00 2001 From: bi4k8 Date: Mon, 12 Dec 2022 00:56:55 +0000 Subject: [PATCH] osd: bookend with calls to cursor_update_focus this updates the cursor if it is within the OSD area when OSD appears or disappears --- src/osd.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/osd.c b/src/osd.c index 5fcc3f0d..582842da 100644 --- a/src/osd.c +++ b/src/osd.c @@ -174,6 +174,9 @@ osd_finish(struct server *server) wlr_scene_node_destroy(&server->osd_state.preview_outline->tree->node); server->osd_state.preview_outline = NULL; } + + /* Hiding OSD may need a cursor change */ + cursor_update_focus(server); } void @@ -371,6 +374,9 @@ display_osd(struct output *output) - h / 2 + output_box.y; wlr_scene_node_set_position(&scene_buffer->node, lx, ly); wlr_scene_node_set_enabled(&output->osd_tree->node, true); + + /* Update cursor, in case it is within the area covered by OSD */ + cursor_update_focus(server); } void