diff options
Diffstat (limited to 'sway/desktop/output.c')
-rw-r--r-- | sway/desktop/output.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 852671d2..dd2eaf08 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -737,14 +737,15 @@ static void update_output_manager_config(struct sway_server *server) { | |||
737 | } | 737 | } |
738 | struct wlr_output_configuration_head_v1 *config_head = | 738 | struct wlr_output_configuration_head_v1 *config_head = |
739 | wlr_output_configuration_head_v1_create(config, output->wlr_output); | 739 | wlr_output_configuration_head_v1_create(config, output->wlr_output); |
740 | struct wlr_box *output_box = wlr_output_layout_get_box( | 740 | struct wlr_box output_box; |
741 | root->output_layout, output->wlr_output); | 741 | wlr_output_layout_get_box(root->output_layout, |
742 | output->wlr_output, &output_box); | ||
742 | // We mark the output enabled even if it is switched off by DPMS | 743 | // We mark the output enabled even if it is switched off by DPMS |
743 | config_head->state.enabled = output->current_mode != NULL && output->enabled; | 744 | config_head->state.enabled = output->current_mode != NULL && output->enabled; |
744 | config_head->state.mode = output->current_mode; | 745 | config_head->state.mode = output->current_mode; |
745 | if (output_box) { | 746 | if (!wlr_box_empty(&output_box)) { |
746 | config_head->state.x = output_box->x; | 747 | config_head->state.x = output_box.x; |
747 | config_head->state.y = output_box->y; | 748 | config_head->state.y = output_box.y; |
748 | } | 749 | } |
749 | } | 750 | } |
750 | 751 | ||