osd: make osd_update() private

This commit is contained in:
tokyo4j 2025-03-14 16:53:18 +09:00 committed by Johan Malm
parent 140e913c44
commit 2be149064e
2 changed files with 7 additions and 8 deletions

View file

@ -44,9 +44,6 @@ void osd_begin(struct server *server, enum lab_cycle_dir direction);
/* Cycle the selected view in the window switcher */
void osd_cycle(struct server *server, enum lab_cycle_dir direction);
/* Updates onscreen display 'alt-tab' buffer */
void osd_update(struct server *server);
/* Closes the OSD */
void osd_finish(struct server *server);

View file

@ -21,6 +21,8 @@
#include "window-rules.h"
#include "workspaces.h"
static void update_osd(struct server *server);
static void
destroy_osd_nodes(struct output *output)
{
@ -119,7 +121,7 @@ osd_on_view_destroy(struct view *view)
if (osd_state->cycle_view) {
/* Update the OSD to reflect the view has now gone. */
osd_update(view->server);
update_osd(view->server);
}
if (view->scene_tree) {
@ -172,7 +174,7 @@ 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_osd(server);
/* Update cursor, in case it is within the area covered by OSD */
cursor_update_focus(server);
@ -185,7 +187,7 @@ osd_cycle(struct server *server, enum lab_cycle_dir direction)
server->osd_state.cycle_view = get_next_cycle_view(server,
server->osd_state.cycle_view, direction);
osd_update(server);
update_osd(server);
}
void
@ -430,8 +432,8 @@ display_osd(struct output *output, struct wl_array *views)
wlr_scene_node_set_enabled(&output->osd_tree->node, true);
}
void
osd_update(struct server *server)
static void
update_osd(struct server *server)
{
struct wl_array views;
wl_array_init(&views);