diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-26 22:27:42 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-07-28 22:41:04 +1000 |
commit | 902a1402ba35be3fbc3c054cd7af5a8bda5f8fd6 (patch) | |
tree | c5ee6afde1c49cf9140a2a5be5d8e37d52a7ab30 | |
parent | 0b6b6716e28b97213c8f4a3c9e65aeba6409987e (diff) |
Fix crash when a child of a floating container is in the scratchpad
-rw-r--r-- | sway/tree/view.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 253f3001..8f54cc11 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -999,11 +999,14 @@ void view_update_marks_textures(struct sway_view *view) { } bool view_is_visible(struct sway_view *view) { - if (!view->swayc || view->swayc->destroying || !view->swayc->parent) { + if (!view->swayc || view->swayc->destroying) { return false; } struct sway_container *workspace = container_parent(view->swayc, C_WORKSPACE); + if (!workspace) { + return false; + } // Determine if view is nested inside a floating container which is sticky. // A simple floating view will have this ancestry: // C_VIEW -> floating -> workspace |