diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-06-03 14:39:12 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-06-03 16:41:17 +0200 |
commit | 5a4a7bc0dad1bb07312f41d6cce9b5a6fc8d884d (patch) | |
tree | 26824b89fe15a3ffc4876d1dba6a6c4ca99866a8 /sway/desktop | |
parent | 7670f1a521e6eacf41385324eba7cc453de9942c (diff) |
container: Remove useless surface dimensions
The adjustments to resize logic left them unnecessary.
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 8 | ||||
-rw-r--r-- | sway/desktop/transaction.c | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 5 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 5 |
4 files changed, 8 insertions, 12 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 18250ae6..2a2e332a 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c @@ -171,8 +171,8 @@ void output_view_for_each_surface(struct sway_output *output, - view->geometry.x, .oy = view->container->surface_y - output->ly - view->geometry.y, - .width = view->container->surface_width, - .height = view->container->surface_height, + .width = view->container->current.content_width, + .height = view->container->current.content_height, .rotation = 0, // TODO }; @@ -191,8 +191,8 @@ void output_view_for_each_popup(struct sway_output *output, - view->geometry.x, .oy = view->container->surface_y - output->ly - view->geometry.y, - .width = view->container->surface_width, - .height = view->container->surface_height, + .width = view->container->current.content_width, + .height = view->container->current.content_height, .rotation = 0, // TODO }; diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index 053312a5..7b9ab586 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -267,8 +267,6 @@ static void apply_container_state(struct sway_container *container, } else { container->surface_y = container->current.content_y; } - container->surface_width = container->current.content_width; - container->surface_height = container->current.content_height; } if (!container->node.destroying) { diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index 01574577..7775f660 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -282,10 +282,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { } else { struct wlr_box new_geo; wlr_xdg_surface_get_geometry(xdg_surface, &new_geo); - struct sway_container *con = view->container; - if ((new_geo.width != con->surface_width || - new_geo.height != con->surface_height)) { + if ((new_geo.width != view->geometry.width || + new_geo.height != view->geometry.height)) { // The view has unexpectedly sent a new size desktop_damage_view(view); view_update_size(view, new_geo.width, new_geo.height); diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 4bf5b6b8..b51bbb74 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -371,10 +371,9 @@ static void handle_commit(struct wl_listener *listener, void *data) { } else { struct wlr_box new_geo; get_geometry(view, &new_geo); - struct sway_container *con = view->container; - if ((new_geo.width != con->surface_width || - new_geo.height != con->surface_height)) { + if ((new_geo.width != view->geometry.width || + new_geo.height != view->geometry.height)) { // The view has unexpectedly sent a new size // eg. The Firefox "Save As" dialog when downloading a file desktop_damage_view(view); |