diff options
author | 2018-07-26 22:27:42 +1000 | |
---|---|---|
committer | 2018-07-28 22:41:04 +1000 | |
commit | 902a1402ba35be3fbc3c054cd7af5a8bda5f8fd6 (patch) | |
tree | c5ee6afde1c49cf9140a2a5be5d8e37d52a7ab30 /sway | |
parent | Fix clicking a floating split container (diff) | |
download | sway-902a1402ba35be3fbc3c054cd7af5a8bda5f8fd6.tar.gz sway-902a1402ba35be3fbc3c054cd7af5a8bda5f8fd6.tar.zst sway-902a1402ba35be3fbc3c054cd7af5a8bda5f8fd6.zip |
Fix crash when a child of a floating container is in the scratchpad
Diffstat (limited to 'sway')
-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) { | |||
999 | } | 999 | } |
1000 | 1000 | ||
1001 | bool view_is_visible(struct sway_view *view) { | 1001 | bool view_is_visible(struct sway_view *view) { |
1002 | if (!view->swayc || view->swayc->destroying || !view->swayc->parent) { | 1002 | if (!view->swayc || view->swayc->destroying) { |
1003 | return false; | 1003 | return false; |
1004 | } | 1004 | } |
1005 | struct sway_container *workspace = | 1005 | struct sway_container *workspace = |
1006 | container_parent(view->swayc, C_WORKSPACE); | 1006 | container_parent(view->swayc, C_WORKSPACE); |
1007 | if (!workspace) { | ||
1008 | return false; | ||
1009 | } | ||
1007 | // Determine if view is nested inside a floating container which is sticky. | 1010 | // Determine if view is nested inside a floating container which is sticky. |
1008 | // A simple floating view will have this ancestry: | 1011 | // A simple floating view will have this ancestry: |
1009 | // C_VIEW -> floating -> workspace | 1012 | // C_VIEW -> floating -> workspace |