From cf759ec1832159d16e032130613c65c28ff188c5 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Sat, 22 Feb 2025 20:38:59 +0900 Subject: [PATCH] osd: don't update cursor while window switching cursor_update_focus() is no-op while server->input_mode is set. So we should only call cursor_update_focus() at the beginning/end of window switching. --- src/osd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/osd.c b/src/osd.c index f4117913..0e62ea2d 100644 --- a/src/osd.c +++ b/src/osd.c @@ -173,6 +173,9 @@ osd_begin(struct server *server, enum lab_cycle_dir direction) seat_focus_override_begin(&server->seat, LAB_INPUT_STATE_WINDOW_SWITCHER, LAB_CURSOR_DEFAULT); osd_update(server); + + /* Update cursor, in case it is within the area covered by OSD */ + cursor_update_focus(server); } void @@ -425,9 +428,6 @@ display_osd(struct output *output, struct wl_array *views) - 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