diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-11-17 11:04:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-17 11:04:34 -0500 |
commit | eda3bfeed5097c71634332bfe998188b028abf02 (patch) | |
tree | a5fb241142cf6815a8fce76eb9b5faf101d69ff9 /sway/desktop/xwayland.c | |
parent | a5cdc293dc8ae6759bd627aaf60d35d9eb4efb04 (diff) | |
parent | be9348d25c9556bdabb83d964a8761f920fc4a11 (diff) |
Merge pull request #3142 from RyanDwyer/move-view-properties
Move view {x,y,width,height} into container struct
Diffstat (limited to 'sway/desktop/xwayland.c')
-rw-r--r-- | sway/desktop/xwayland.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 0c41d960..1838ad32 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -332,9 +332,11 @@ 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 != 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 // eg. The Firefox "Save As" dialog when downloading a file desktop_damage_view(view); @@ -432,13 +434,13 @@ static void handle_request_configure(struct wl_listener *listener, void *data) { return; } if (container_is_floating(view->container)) { - configure(view, view->container->current.view_x, - view->container->current.view_y, ev->width, ev->height); + configure(view, view->container->current.content_x, + view->container->current.content_y, ev->width, ev->height); } else { - configure(view, view->container->current.view_x, - view->container->current.view_y, - view->container->current.view_width, - view->container->current.view_height); + configure(view, view->container->current.content_x, + view->container->current.content_y, + view->container->current.content_width, + view->container->current.content_height); } } |