]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: don't update cursor while window switching
authortokyo4j <hrak1529@gmail.com>
Sat, 22 Feb 2025 11:38:59 +0000 (20:38 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 9 Mar 2025 20:41:26 +0000 (20:41 +0000)
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

index f4117913685d6fe1cf5b953d22847abb9fe9feed..0e62ea2d57a870f42b52a1256eae983089779e0c 100644 (file)
--- 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