diff options
author | Kirill Primak <vyivel@eclair.cafe> | 2022-01-29 23:11:54 +0300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2022-01-31 11:44:03 +0100 |
commit | ee7668c1f2b5ba31420d972161d6d43fc1c84bb4 (patch) | |
tree | db2d114113e60cfa4f5a1c87813c53868e0bf9f1 /sway/desktop | |
parent | xwayland: listen to `request_activate` event (diff) | |
download | sway-ee7668c1f2b5ba31420d972161d6d43fc1c84bb4.tar.gz sway-ee7668c1f2b5ba31420d972161d6d43fc1c84bb4.tar.zst sway-ee7668c1f2b5ba31420d972161d6d43fc1c84bb4.zip |
chore: chase wlr_output_layout_get_box() update
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3439
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/desktop.c | 9 | ||||
-rw-r--r-- | sway/desktop/output.c | 11 |
2 files changed, 11 insertions, 9 deletions
diff --git a/sway/desktop/desktop.c b/sway/desktop/desktop.c index ec45d80a..c8d4502c 100644 --- a/sway/desktop/desktop.c +++ b/sway/desktop/desktop.c | |||
@@ -6,10 +6,11 @@ void desktop_damage_surface(struct wlr_surface *surface, double lx, double ly, | |||
6 | bool whole) { | 6 | bool whole) { |
7 | for (int i = 0; i < root->outputs->length; ++i) { | 7 | for (int i = 0; i < root->outputs->length; ++i) { |
8 | struct sway_output *output = root->outputs->items[i]; | 8 | struct sway_output *output = root->outputs->items[i]; |
9 | struct wlr_box *output_box = wlr_output_layout_get_box( | 9 | struct wlr_box output_box; |
10 | root->output_layout, output->wlr_output); | 10 | wlr_output_layout_get_box(root->output_layout, |
11 | output_damage_surface(output, lx - output_box->x, | 11 | output->wlr_output, &output_box); |
12 | ly - output_box->y, surface, whole); | 12 | output_damage_surface(output, lx - output_box.x, |
13 | ly - output_box.y, surface, whole); | ||
13 | } | 14 | } |
14 | } | 15 | } |
15 | 16 | ||
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 | ||