aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-06-17 14:49:18 +0100
committeremersion <contact@emersion.fr>2018-06-17 14:49:18 +0100
commit57548b557ae9e4f2b03c2d78996706f0990ab9d6 (patch)
tree85d7ae8d5d3f302d16914690f8e30e40e8ba0969 /rootston/xdg_shell.c
parentbd0c1b794992bf94560bd429f4057c9d09989f06 (diff)
parentfb118ac9966bbb663ddb9964f54c879a0bb88fba (diff)
Merge branch 'master' into screencontent
Diffstat (limited to 'rootston/xdg_shell.c')
-rw-r--r--rootston/xdg_shell.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/rootston/xdg_shell.c b/rootston/xdg_shell.c
index 03ae1dc6..805fb874 100644
--- a/rootston/xdg_shell.c
+++ b/rootston/xdg_shell.c
@@ -132,14 +132,10 @@ static void get_size(const struct roots_view *view, struct wlr_box *box) {
assert(view->type == ROOTS_XDG_SHELL_VIEW);
struct wlr_xdg_surface *surface = view->xdg_surface;
- if (surface->geometry.width > 0 && surface->geometry.height > 0) {
- box->width = surface->geometry.width;
- box->height = surface->geometry.height;
- } else {
- assert(surface->surface);
- box->width = surface->surface->current->width;
- box->height = surface->surface->current->height;
- }
+ struct wlr_box geo_box;
+ wlr_xdg_surface_get_geometry(surface, &geo_box);
+ box->width = geo_box.width;
+ box->height = geo_box.height;
}
static void activate(struct roots_view *view, bool active) {