From 8e58279c26bfd0fe4608f62199b42270e0233ecb Mon Sep 17 00:00:00 2001 From: tiosgz Date: Wed, 15 Sep 2021 16:58:02 +0000 Subject: [PATCH] Fix xdg_shell_view_get_size If the view doesn't set its size explicitly (e.g. imv), it returned 0 --- kiwmi/desktop/xdg_shell.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kiwmi/desktop/xdg_shell.c b/kiwmi/desktop/xdg_shell.c index 3402a02..107675f 100644 --- a/kiwmi/desktop/xdg_shell.c +++ b/kiwmi/desktop/xdg_shell.c @@ -388,10 +388,11 @@ xdg_shell_view_get_size( uint32_t *width, uint32_t *height) { - struct wlr_box *geom = &view->xdg_surface->geometry; + struct wlr_box geom; + wlr_xdg_surface_get_geometry(view->xdg_surface, &geom); - *width = geom->width; - *height = geom->height; + *width = geom.width; + *height = geom.height; } static const char *