mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
Fix crash when focus hits edge of root
This commit is contained in:
parent
acc2628c79
commit
0df04e27b6
1 changed files with 4 additions and 0 deletions
|
@ -255,6 +255,10 @@ struct cmd_results *cmd_focus(int argc, char **argv) {
|
|||
// A workspace is focused, so just jump to the next output
|
||||
struct sway_output *new_output =
|
||||
output_get_in_direction(workspace->output, direction);
|
||||
if (!new_output) {
|
||||
return cmd_results_new(CMD_SUCCESS, NULL, NULL);
|
||||
}
|
||||
|
||||
struct sway_node *node =
|
||||
get_node_in_output_direction(new_output, direction);
|
||||
seat_set_focus(seat, node);
|
||||
|
|
Loading…
Reference in a new issue