mirror of
https://github.com/labwc/labwc.git
synced 2026-02-05 04:06:33 -05:00
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.
This commit is contained in:
parent
37c7de32c8
commit
7d7ece21d9
1 changed files with 3 additions and 8 deletions
11
src/output.c
11
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue