diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/input/seat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index e10b6409..69bee47e 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c @@ -952,6 +952,9 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) { if (!seat->has_focus) { return NULL; } + if (wl_list_length(&seat->focus_stack) == 0) { + return NULL; + } struct sway_seat_node *current = wl_container_of(seat->focus_stack.next, current, link); return current->node; |