diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-12-18 07:59:49 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-12-18 07:59:49 -0500 |
commit | 8033eb4d6ad2444e19681b429fe790e2528569b0 (patch) | |
tree | 47e0c481dcd80f8bc514a1694077276f8164a204 | |
parent | Merge pull request #354 from sce/fix_swaybar_for_fedora (diff) | |
parent | focus: Fix moving last workspace. (diff) | |
download | sway-8033eb4d6ad2444e19681b429fe790e2528569b0.tar.gz sway-8033eb4d6ad2444e19681b429fe790e2528569b0.tar.zst sway-8033eb4d6ad2444e19681b429fe790e2528569b0.zip |
Merge pull request #355 from sce/fix_moving_last_ws
focus: Fix moving last workspace.
-rw-r--r-- | sway/focus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/focus.c b/sway/focus.c index c60f410c..c1170ca4 100644 --- a/sway/focus.c +++ b/sway/focus.c | |||
@@ -96,7 +96,10 @@ bool set_focused_container(swayc_t *c) { | |||
96 | return false; | 96 | return false; |
97 | } | 97 | } |
98 | swayc_t *active_ws = swayc_active_workspace(); | 98 | swayc_t *active_ws = swayc_active_workspace(); |
99 | int active_ws_child_count = active_ws->children->length + active_ws->floating->length; | 99 | int active_ws_child_count = 0; |
100 | if (active_ws) { | ||
101 | active_ws_child_count = active_ws->children->length + active_ws->floating->length; | ||
102 | } | ||
100 | 103 | ||
101 | swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle); | 104 | swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle); |
102 | 105 | ||