aboutsummaryrefslogtreecommitdiff
path: root/rootston/desktop.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-01 21:52:48 +0100
committerGitHub <noreply@github.com>2018-11-01 21:52:48 +0100
commit675cf8457ef3493112def366d7090731172ee872 (patch)
tree4ad9f48d9b58c1e9aa47f87884a05ae5a107a483 /rootston/desktop.c
parent70ca7daeb232ac591a78111fc2cc31093cbbbc3b (diff)
parent0c7371221c35a94e1fd7abf77f09dabd202d6c98 (diff)
Merge pull request #1341 from emersion/view-at-unmapped
rootston: fix segfault in view_at
Diffstat (limited to 'rootston/desktop.c')
-rw-r--r--rootston/desktop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 69c71867..7da64ef8 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -439,6 +439,11 @@ void view_destroy(struct roots_view *view) {
view_unmap(view);
}
+ // Can happen if fullscreened while unmapped, and hasn't been mapped
+ if (view->fullscreen_output != NULL) {
+ view->fullscreen_output->fullscreen_view = NULL;
+ }
+
if (view->destroy) {
view->destroy(view);
}
@@ -576,6 +581,9 @@ static bool view_at(struct roots_view *view, double lx, double ly,
view->wl_shell_surface->state == WLR_WL_SHELL_SURFACE_STATE_POPUP) {
return false;
}
+ if (view->wlr_surface == NULL) {
+ return false;
+ }
double view_sx = lx - view->x;
double view_sy = ly - view->y;