aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-01-24 18:49:47 +0100
committeremersion <contact@emersion.fr>2018-01-24 18:49:47 +0100
commit3f96427d0854ef38ee295724ebd36dcb74c0659c (patch)
treedcafc9e27ccd400a5ec7e6a0c78f2923c73d1f66 /rootston/desktop.c
parent6281deb90fa6a97835d5045a8be610556ab588fe (diff)
parent2ad7df868097d557ed3cc41dfa60e0637f8a08e8 (diff)
Merge branch 'output-damage' of github.com:emersion/wlroots into output-damage
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c6
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;
}