aboutsummaryrefslogtreecommitdiff
path: root/rootston/xdg_shell_v6.c
diff options
context:
space:
mode:
Diffstat (limited to 'rootston/xdg_shell_v6.c')
-rw-r--r--rootston/xdg_shell_v6.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/rootston/xdg_shell_v6.c b/rootston/xdg_shell_v6.c
index 90b11690..02ad867d 100644
--- a/rootston/xdg_shell_v6.c
+++ b/rootston/xdg_shell_v6.c
@@ -133,14 +133,10 @@ static void get_size(const struct roots_view *view, struct wlr_box *box) {
assert(view->type == ROOTS_XDG_SHELL_V6_VIEW);
struct wlr_xdg_surface_v6 *surface = view->xdg_surface_v6;
- 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_v6_get_geometry(surface, &geo_box);
+ box->width = geo_box.width;
+ box->height = geo_box.height;
}
static void activate(struct roots_view *view, bool active) {