diff options
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r-- | rootston/desktop.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c index 727710fe..b2d586f4 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -27,6 +27,12 @@ void view_get_box(const struct roots_view *view, struct wlr_box *box) { if (view->get_size) { view->get_size(view, box); } else { + if (view->wlr_surface == NULL) { + // View is unmapped + box->width = box->height = 0; + return; + } + box->width = view->wlr_surface->current->width; box->height = view->wlr_surface->current->height; } |