aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-17 11:04:34 -0500
committerGitHub <noreply@github.com>2018-11-17 11:04:34 -0500
commiteda3bfeed5097c71634332bfe998188b028abf02 (patch)
treea5fb241142cf6815a8fce76eb9b5faf101d69ff9 /sway/desktop/xdg_shell_v6.c
parenta5cdc293dc8ae6759bd627aaf60d35d9eb4efb04 (diff)
parentbe9348d25c9556bdabb83d964a8761f920fc4a11 (diff)
downloadsway-eda3bfeed5097c71634332bfe998188b028abf02.tar.xz
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c10
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) {
// the output box expressed in the coordinate system of the toplevel parent
// of the popup
struct wlr_box output_toplevel_sx_box = {
- .x = output->lx - view->x,
- .y = output->ly - view->y,
+ .x = output->lx - view->container->content_x,
+ .y = output->ly - view->container->content_y,
.width = output->width,
.height = output->height,
};
@@ -283,9 +283,11 @@ static void handle_commit(struct wl_listener *listener, void *data) {
} else {
struct wlr_box new_geo;
wlr_xdg_surface_v6_get_geometry(xdg_surface_v6, &new_geo);
+ struct sway_container *con = view->container;
- if ((new_geo.width != view->width || new_geo.height != view->height) &&
- container_is_floating(view->container)) {
+ if ((new_geo.width != con->content_width ||
+ new_geo.height != con->content_height) &&
+ container_is_floating(con)) {
// A floating view has unexpectedly sent a new size
desktop_damage_view(view);
view_update_size(view, new_geo.width, new_geo.height);