aboutsummaryrefslogtreecommitdiffstats
path: root/sway/tree/view.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-02 15:37:56 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-05 18:01:43 +1000
commit4e0452fce3bfc96db6f6f2951794cbb26e75ccd7 (patch)
treedfc9d82c97b051ec1829f918829a1f3c852c5131 /sway/tree/view.c
parentFix output position issue (diff)
downloadsway-4e0452fce3bfc96db6f6f2951794cbb26e75ccd7.tar.gz
sway-4e0452fce3bfc96db6f6f2951794cbb26e75ccd7.tar.zst
sway-4e0452fce3bfc96db6f6f2951794cbb26e75ccd7.zip
Fix scratchpad related crashes
* Was crashing when a view was moved to the scratchpad (prev focus had no parent). * Was crashing when a hidden scratchpad view unmaps because it has no workspace.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 1b8d5738..57851b16 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -560,11 +560,11 @@ void view_unmap(struct sway_view *view) {
560 container_begin_destroy(view->container); 560 container_begin_destroy(view->container);
561 if (parent) { 561 if (parent) {
562 container_reap_empty(parent); 562 container_reap_empty(parent);
563 } else { 563 } else if (ws) {
564 workspace_consider_destroy(ws); 564 workspace_consider_destroy(ws);
565 } 565 }
566 566
567 if (!ws->node.destroying) { 567 if (ws && !ws->node.destroying) {
568 arrange_workspace(ws); 568 arrange_workspace(ws);
569 workspace_detect_urgent(ws); 569 workspace_detect_urgent(ws);
570 } 570 }