diff options
author | Simon Ser <contact@emersion.fr> | 2023-07-31 10:09:40 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-07-31 16:25:01 +0200 |
commit | 170598d71b59b6cae767e20679369ac3250ef2e9 (patch) | |
tree | d6b35714dc34679a196d56848ff77a8b18a4d4ce | |
parent | d3626efe5ef96f056f72f320a6487947ff22f8d9 (diff) |
desktop/output: fix output manager enabled state
With recent wlroots changes, backends which don't support output
modes can now support being disabled.
We were always marking mode-less outputs as disabled. Stop doing
that, check whether the output takes up some space in the layout
instead.
-rw-r--r-- | sway/desktop/output.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index f052e6f4..aed1fdeb 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -883,12 +883,9 @@ static void update_output_manager_config(struct sway_server *server) { wlr_output_layout_get_box(root->output_layout, output->wlr_output, &output_box); // We mark the output enabled when it's switched off but not disabled - config_head->state.enabled = output->current_mode != NULL && output->enabled; - config_head->state.mode = output->current_mode; - if (!wlr_box_empty(&output_box)) { - config_head->state.x = output_box.x; - config_head->state.y = output_box.y; - } + config_head->state.enabled = !wlr_box_empty(&output_box); + config_head->state.x = output_box.x; + config_head->state.y = output_box.y; } wlr_output_manager_v1_set_configuration(server->output_manager_v1, config); |