aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/focus.c
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-02 22:07:21 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-03 08:49:26 +0100
commit2942bbbc609a5ed2137dd9319bcdfae636df30a1 (patch)
treefe7edfbeef6e905909a638aa2ac65d7766265a3a /sway/commands/focus.c
parentMerge pull request #3239 from ForTheReallys/bindsym-no-warn (diff)
downloadsway-2942bbbc609a5ed2137dd9319bcdfae636df30a1.tar.gz
sway-2942bbbc609a5ed2137dd9319bcdfae636df30a1.tar.zst
sway-2942bbbc609a5ed2137dd9319bcdfae636df30a1.zip
cmd_focus: show scratchpad if hidden
If a scratchpad container is hidden, it is still focusable using criteria and should be shown. This fixes a segfault when attempting to rebase the cursor since previously the scratchpad container would not be on any output.
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r--sway/commands/focus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index f6338c55..689edfec 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -269,6 +269,9 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
269 } 269 }
270 270
271 if (argc == 0 && container) { 271 if (argc == 0 && container) {
272 if (container->scratchpad && !container->workspace) {
273 root_scratchpad_show(container);
274 }
272 seat_set_focus_container(seat, container); 275 seat_set_focus_container(seat, container);
273 seat_consider_warp_to_focus(seat); 276 seat_consider_warp_to_focus(seat);
274 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 277 return cmd_results_new(CMD_SUCCESS, NULL, NULL);