From 94fa64749650cf16d050ffa593467f7cd1374120 Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Thu, 15 Jan 2026 02:10:21 +0900 Subject: [PATCH] output: suppress error when output position is unavailable This commit removes the "failed to get output layout box" error printed when disabling an output with `wlr-randr`. Also, use `output->scene_output->{x,y}` instead of calling `wlr_output_layout_get_box()` for simplicity. The positions of scene-outputs are synced with the output-layout-outputs. --- src/output.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/output.c b/src/output.c index 7a42a7df..85968c25 100644 --- a/src/output.c +++ b/src/output.c @@ -880,14 +880,9 @@ wlr_output_configuration_v1 *create_output_config(struct server *server) wlr_output_configuration_v1_destroy(config); return NULL; } - struct wlr_box box; - wlr_output_layout_get_box(server->output_layout, - output->wlr_output, &box); - if (!wlr_box_empty(&box)) { - head->state.x = box.x; - head->state.y = box.y; - } else { - wlr_log(WLR_ERROR, "failed to get output layout box"); + if (output_is_usable(output)) { + head->state.x = output->scene_output->x; + head->state.y = output->scene_output->y; } } return config;