diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-07-01 09:46:02 -0400 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-07-05 00:26:35 +0100 |
commit | d43500831a78580f59525144a0c9b034d4d399d0 (patch) | |
tree | aacb4197dcfc144fb5790eb2a7287649520c8fc7 | |
parent | Merge pull request #2211 from RyanDwyer/fix-xdgtoplevel-tiled (diff) | |
download | sway-d43500831a78580f59525144a0c9b034d4d399d0.tar.gz sway-d43500831a78580f59525144a0c9b034d4d399d0.tar.zst sway-d43500831a78580f59525144a0c9b034d4d399d0.zip |
Updates per wlroots#1076
-rw-r--r-- | sway/desktop/output.c | 18 | ||||
-rw-r--r-- | sway/desktop/transaction.c | 4 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 4 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 4 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 |
5 files changed, 16 insertions, 16 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 1e7494b3..a86c1646 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -81,8 +81,8 @@ static bool get_surface_box(struct root_geometry *geo, | |||
81 | return false; | 81 | return false; |
82 | } | 82 | } |
83 | 83 | ||
84 | int sw = surface->current->width; | 84 | int sw = surface->current.width; |
85 | int sh = surface->current->height; | 85 | int sh = surface->current.height; |
86 | 86 | ||
87 | double _sx = sx, _sy = sy; | 87 | double _sx = sx, _sy = sy; |
88 | rotate_child_position(&_sx, &_sy, sw, sh, geo->width, geo->height, | 88 | rotate_child_position(&_sx, &_sy, sw, sh, geo->width, geo->height, |
@@ -115,8 +115,8 @@ static void surface_for_each_surface(struct wlr_surface *surface, | |||
115 | wlr_surface_iterator_func_t iterator, void *user_data) { | 115 | wlr_surface_iterator_func_t iterator, void *user_data) { |
116 | geo->x = ox; | 116 | geo->x = ox; |
117 | geo->y = oy; | 117 | geo->y = oy; |
118 | geo->width = surface->current->width; | 118 | geo->width = surface->current.width; |
119 | geo->height = surface->current->height; | 119 | geo->height = surface->current.height; |
120 | geo->rotation = 0; | 120 | geo->rotation = 0; |
121 | 121 | ||
122 | wlr_surface_for_each_surface(surface, iterator, user_data); | 122 | wlr_surface_for_each_surface(surface, iterator, user_data); |
@@ -258,7 +258,7 @@ static void render_surface_iterator(struct wlr_surface *surface, int sx, int sy, | |||
258 | 258 | ||
259 | float matrix[9]; | 259 | float matrix[9]; |
260 | enum wl_output_transform transform = | 260 | enum wl_output_transform transform = |
261 | wlr_output_transform_invert(surface->current->transform); | 261 | wlr_output_transform_invert(surface->current.transform); |
262 | wlr_matrix_project_box(matrix, &box, transform, rotation, | 262 | wlr_matrix_project_box(matrix, &box, transform, rotation, |
263 | wlr_output->transform_matrix); | 263 | wlr_output->transform_matrix); |
264 | 264 | ||
@@ -1163,16 +1163,16 @@ static void damage_surface_iterator(struct wlr_surface *surface, int sx, int sy, | |||
1163 | int center_x = box.x + box.width/2; | 1163 | int center_x = box.x + box.width/2; |
1164 | int center_y = box.y + box.height/2; | 1164 | int center_y = box.y + box.height/2; |
1165 | 1165 | ||
1166 | if (pixman_region32_not_empty(&surface->current->surface_damage)) { | 1166 | if (pixman_region32_not_empty(&surface->current.surface_damage)) { |
1167 | pixman_region32_t damage; | 1167 | pixman_region32_t damage; |
1168 | pixman_region32_init(&damage); | 1168 | pixman_region32_init(&damage); |
1169 | pixman_region32_copy(&damage, &surface->current->surface_damage); | 1169 | pixman_region32_copy(&damage, &surface->current.surface_damage); |
1170 | wlr_region_scale(&damage, &damage, output->wlr_output->scale); | 1170 | wlr_region_scale(&damage, &damage, output->wlr_output->scale); |
1171 | if (ceil(output->wlr_output->scale) > surface->current->scale) { | 1171 | if (ceil(output->wlr_output->scale) > surface->current.scale) { |
1172 | // When scaling up a surface, it'll become blurry so we need to | 1172 | // When scaling up a surface, it'll become blurry so we need to |
1173 | // expand the damage region | 1173 | // expand the damage region |
1174 | wlr_region_expand(&damage, &damage, | 1174 | wlr_region_expand(&damage, &damage, |
1175 | ceil(output->wlr_output->scale) - surface->current->scale); | 1175 | ceil(output->wlr_output->scale) - surface->current.scale); |
1176 | } | 1176 | } |
1177 | pixman_region32_translate(&damage, box.x, box.y); | 1177 | pixman_region32_translate(&damage, box.x, box.y); |
1178 | wlr_region_rotated_bounds(&damage, &damage, rotation, | 1178 | wlr_region_rotated_bounds(&damage, &damage, rotation, |
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index b4d796cb..179af617 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c | |||
@@ -73,8 +73,8 @@ static void save_view_buffer(struct sway_view *view, | |||
73 | } | 73 | } |
74 | if (view->surface && wlr_surface_has_buffer(view->surface)) { | 74 | if (view->surface && wlr_surface_has_buffer(view->surface)) { |
75 | instruction->saved_buffer = wlr_buffer_ref(view->surface->buffer); | 75 | instruction->saved_buffer = wlr_buffer_ref(view->surface->buffer); |
76 | instruction->saved_buffer_width = view->surface->current->width; | 76 | instruction->saved_buffer_width = view->surface->current.width; |
77 | instruction->saved_buffer_height = view->surface->current->height; | 77 | instruction->saved_buffer_height = view->surface->current.height; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 2b634749..ac35a8d1 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -251,8 +251,8 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
251 | view->natural_width = view->wlr_xdg_surface->geometry.width; | 251 | view->natural_width = view->wlr_xdg_surface->geometry.width; |
252 | view->natural_height = view->wlr_xdg_surface->geometry.height; | 252 | view->natural_height = view->wlr_xdg_surface->geometry.height; |
253 | if (!view->natural_width && !view->natural_height) { | 253 | if (!view->natural_width && !view->natural_height) { |
254 | view->natural_width = view->wlr_xdg_surface->surface->current->width; | 254 | view->natural_width = view->wlr_xdg_surface->surface->current.width; |
255 | view->natural_height = view->wlr_xdg_surface->surface->current->height; | 255 | view->natural_height = view->wlr_xdg_surface->surface->current.height; |
256 | } | 256 | } |
257 | 257 | ||
258 | view_map(view, view->wlr_xdg_surface->surface); | 258 | view_map(view, view->wlr_xdg_surface->surface); |
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 2f0730e4..56bbb244 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -246,8 +246,8 @@ static void handle_map(struct wl_listener *listener, void *data) { | |||
246 | view->natural_width = view->wlr_xdg_surface_v6->geometry.width; | 246 | view->natural_width = view->wlr_xdg_surface_v6->geometry.width; |
247 | view->natural_height = view->wlr_xdg_surface_v6->geometry.height; | 247 | view->natural_height = view->wlr_xdg_surface_v6->geometry.height; |
248 | if (!view->natural_width && !view->natural_height) { | 248 | if (!view->natural_width && !view->natural_height) { |
249 | view->natural_width = view->wlr_xdg_surface_v6->surface->current->width; | 249 | view->natural_width = view->wlr_xdg_surface_v6->surface->current.width; |
250 | view->natural_height = view->wlr_xdg_surface_v6->surface->current->height; | 250 | view->natural_height = view->wlr_xdg_surface_v6->surface->current.height; |
251 | } | 251 | } |
252 | 252 | ||
253 | view_map(view, view->wlr_xdg_surface_v6->surface); | 253 | view_map(view, view->wlr_xdg_surface_v6->surface); |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 71803262..0669a485 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -278,7 +278,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
278 | wl_container_of(listener, xwayland_view, commit); | 278 | wl_container_of(listener, xwayland_view, commit); |
279 | struct sway_view *view = &xwayland_view->view; | 279 | struct sway_view *view = &xwayland_view->view; |
280 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; | 280 | struct wlr_xwayland_surface *xsurface = view->wlr_xwayland_surface; |
281 | struct wlr_surface_state *surface_state = xsurface->surface->current; | 281 | struct wlr_surface_state *surface_state = &xsurface->surface->current; |
282 | 282 | ||
283 | if (view->swayc->instructions->length) { | 283 | if (view->swayc->instructions->length) { |
284 | transaction_notify_view_ready_by_size(view, | 284 | transaction_notify_view_ready_by_size(view, |