mirror of
https://github.com/swaywm/sway.git
synced 2026-06-13 14:33:19 -04:00
commands/focus: handle NULL workspace in focus_mode
Avoid executing `focus tiling` on a container that is in the scratchpad, and therefore has a NULL workspace.
This commit is contained in:
parent
f1b40bc288
commit
c269413c17
1 changed files with 4 additions and 0 deletions
|
|
@ -260,6 +260,10 @@ static struct sway_node *node_get_in_direction_floating(
|
|||
|
||||
static struct cmd_results *focus_mode(struct sway_workspace *ws,
|
||||
struct sway_seat *seat, bool floating) {
|
||||
if (!ws) {
|
||||
return cmd_results_new(CMD_FAILURE,
|
||||
"Target container is not in a workspace");
|
||||
}
|
||||
struct sway_container *new_focus = NULL;
|
||||
if (floating) {
|
||||
new_focus = seat_get_focus_inactive_floating(seat, ws);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue