diff options
Diffstat (limited to 'sway/commands/focus.c')
-rw-r--r-- | sway/commands/focus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sway/commands/focus.c b/sway/commands/focus.c index f6338c55..97ffe91c 100644 --- a/sway/commands/focus.c +++ b/sway/commands/focus.c | |||
@@ -193,7 +193,7 @@ static struct cmd_results *focus_output(struct sway_seat *seat, | |||
193 | "Expected 'focus output <direction|name>'"); | 193 | "Expected 'focus output <direction|name>'"); |
194 | } | 194 | } |
195 | char *identifier = join_args(argv, argc); | 195 | char *identifier = join_args(argv, argc); |
196 | struct sway_output *output = output_by_name(identifier); | 196 | struct sway_output *output = output_by_name_or_id(identifier); |
197 | 197 | ||
198 | if (!output) { | 198 | if (!output) { |
199 | enum wlr_direction direction; | 199 | enum wlr_direction direction; |
@@ -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); |