diff options
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 692cfbf5..4bc83b8e 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -74,8 +74,8 @@ static void popup_unconstrain(struct sway_xdg_popup_v6 *popup) { | |||
74 | // the output box expressed in the coordinate system of the toplevel parent | 74 | // the output box expressed in the coordinate system of the toplevel parent |
75 | // of the popup | 75 | // of the popup |
76 | struct wlr_box output_toplevel_sx_box = { | 76 | struct wlr_box output_toplevel_sx_box = { |
77 | .x = output->lx - view->x, | 77 | .x = output->lx - view->container->content_x, |
78 | .y = output->ly - view->y, | 78 | .y = output->ly - view->container->content_y, |
79 | .width = output->width, | 79 | .width = output->width, |
80 | .height = output->height, | 80 | .height = output->height, |
81 | }; | 81 | }; |
@@ -283,9 +283,11 @@ static void handle_commit(struct wl_listener *listener, void *data) { | |||
283 | } else { | 283 | } else { |
284 | struct wlr_box new_geo; | 284 | struct wlr_box new_geo; |
285 | wlr_xdg_surface_v6_get_geometry(xdg_surface_v6, &new_geo); | 285 | wlr_xdg_surface_v6_get_geometry(xdg_surface_v6, &new_geo); |
286 | struct sway_container *con = view->container; | ||
286 | 287 | ||
287 | if ((new_geo.width != view->width || new_geo.height != view->height) && | 288 | if ((new_geo.width != con->content_width || |
288 | container_is_floating(view->container)) { | 289 | new_geo.height != con->content_height) && |
290 | container_is_floating(con)) { | ||
289 | // A floating view has unexpectedly sent a new size | 291 | // A floating view has unexpectedly sent a new size |
290 | desktop_damage_view(view); | 292 | desktop_damage_view(view); |
291 | view_update_size(view, new_geo.width, new_geo.height); | 293 | view_update_size(view, new_geo.width, new_geo.height); |