]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: bookend with calls to cursor_update_focus
authorbi4k8 <bi4k8@github>
Mon, 12 Dec 2022 00:56:55 +0000 (00:56 +0000)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Wed, 14 Dec 2022 11:29:16 +0000 (12:29 +0100)
this updates the cursor if it is within the OSD area when OSD appears
or disappears

src/osd.c

index 5fcc3f0d0ccd61b451d8f314ec901ae73df709e4..582842da01b70b30ec54fe3de93ca8e52748de83 100644 (file)
--- 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