From 2942bbbc609a5ed2137dd9319bcdfae636df30a1 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 2 Dec 2018 22:07:21 -0500 Subject: 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. --- sway/commands/focus.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sway') 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) { } if (argc == 0 && container) { + if (container->scratchpad && !container->workspace) { + root_scratchpad_show(container); + } seat_set_focus_container(seat, container); seat_consider_warp_to_focus(seat); return cmd_results_new(CMD_SUCCESS, NULL, NULL); -- cgit v1.2.3