summaryrefslogtreecommitdiffstats
path: root/sway/desktop/xdg_shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/desktop/xdg_shell.c')
-rw-r--r--sway/desktop/xdg_shell.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index 0b2ebc96..801dcee0 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -75,8 +75,8 @@ static void popup_unconstrain(struct sway_xdg_popup *popup) {
75 // the output box expressed in the coordinate system of the toplevel parent 75 // the output box expressed in the coordinate system of the toplevel parent
76 // of the popup 76 // of the popup
77 struct wlr_box output_toplevel_sx_box = { 77 struct wlr_box output_toplevel_sx_box = {
78 .x = output->lx - view->x, 78 .x = output->lx - view->container->content_x,
79 .y = output->ly - view->y, 79 .y = output->ly - view->container->content_y,
80 .width = output->width, 80 .width = output->width,
81 .height = output->height, 81 .height = output->height,
82 }; 82 };
@@ -286,9 +286,11 @@ static void handle_commit(struct wl_listener *listener, void *data) {
286 } else { 286 } else {
287 struct wlr_box new_geo; 287 struct wlr_box new_geo;
288 wlr_xdg_surface_get_geometry(xdg_surface, &new_geo); 288 wlr_xdg_surface_get_geometry(xdg_surface, &new_geo);
289 struct sway_container *con = view->container;
289 290
290 if ((new_geo.width != view->width || new_geo.height != view->height) && 291 if ((new_geo.width != con->content_width ||
291 container_is_floating(view->container)) { 292 new_geo.height != con->content_height) &&
293 container_is_floating(con)) {
292 // A floating view has unexpectedly sent a new size 294 // A floating view has unexpectedly sent a new size
293 desktop_damage_view(view); 295 desktop_damage_view(view);
294 view_update_size(view, new_geo.width, new_geo.height); 296 view_update_size(view, new_geo.width, new_geo.height);