diff options
-rw-r--r-- | include/sway/tree/view.h | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 | ||||
-rw-r--r-- | sway/tree/view.c | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 18dc2019..86bd981c 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -316,7 +316,7 @@ void view_map(struct sway_view *view, struct wlr_surface *wlr_surface, | |||
316 | 316 | ||
317 | void view_unmap(struct sway_view *view); | 317 | void view_unmap(struct sway_view *view); |
318 | 318 | ||
319 | void view_update_size(struct sway_view *view, int width, int height); | 319 | void view_update_size(struct sway_view *view); |
320 | void view_center_surface(struct sway_view *view); | 320 | void view_center_surface(struct sway_view *view); |
321 | 321 | ||
322 | void view_child_init(struct sway_view_child *child, | 322 | void view_child_init(struct sway_view_child *child, |
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index cbf16662..14880dcd 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c | |||
@@ -297,7 +297,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
297 | desktop_damage_view(view); | 297 | desktop_damage_view(view); |
298 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 298 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
299 | if (container_is_floating(view->container)) { | 299 | if (container_is_floating(view->container)) { |
300 | view_update_size(view, new_geo.width, new_geo.height); | 300 | view_update_size(view); |
301 | transaction_commit_dirty(); | 301 | transaction_commit_dirty(); |
302 | transaction_notify_view_ready_immediately(view); | 302 | transaction_notify_view_ready_immediately(view); |
303 | } else { | 303 | } else { |
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 8b39cf50..4cd5f9d0 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c | |||
@@ -412,7 +412,7 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
412 | desktop_damage_view(view); | 412 | desktop_damage_view(view); |
413 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); | 413 | memcpy(&view->geometry, &new_geo, sizeof(struct wlr_box)); |
414 | if (container_is_floating(view->container)) { | 414 | if (container_is_floating(view->container)) { |
415 | view_update_size(view, new_geo.width, new_geo.height); | 415 | view_update_size(view); |
416 | transaction_commit_dirty(); | 416 | transaction_commit_dirty(); |
417 | } else { | 417 | } else { |
418 | view_center_surface(view); | 418 | view_center_surface(view); |
diff --git a/sway/tree/view.c b/sway/tree/view.c index 38417874..e62fd018 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -872,10 +872,10 @@ void view_unmap(struct sway_view *view) { | |||
872 | view->surface = NULL; | 872 | view->surface = NULL; |
873 | } | 873 | } |
874 | 874 | ||
875 | void view_update_size(struct sway_view *view, int width, int height) { | 875 | void view_update_size(struct sway_view *view) { |
876 | struct sway_container *con = view->container; | 876 | struct sway_container *con = view->container; |
877 | con->content_width = width; | 877 | con->content_width = view->geometry.width; |
878 | con->content_height = height; | 878 | con->content_height = view->geometry.height; |
879 | container_set_geometry_from_content(con); | 879 | container_set_geometry_from_content(con); |
880 | } | 880 | } |
881 | 881 | ||