diff options
author | emersion <contact@emersion.fr> | 2018-10-27 21:22:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-27 21:22:03 +0200 |
commit | f9a276544b40e74c5c0c0e2be99b950c6c474edf (patch) | |
tree | 519598a6344496d142aae6ff8eaab0dc8a5a1f1b | |
parent | Merge pull request #3001 from madblobfish/swaylock-completions-and-manpage (diff) | |
parent | seat: don't traverse the list to check if it's empty (diff) | |
download | sway-f9a276544b40e74c5c0c0e2be99b950c6c474edf.tar.gz sway-f9a276544b40e74c5c0c0e2be99b950c6c474edf.tar.zst sway-f9a276544b40e74c5c0c0e2be99b950c6c474edf.zip |
Merge pull request #3003 from Hi-Angel/master
seat: don't traverse the list to check if it's empty
-rw-r--r-- | sway/input/seat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 9d4dc7af..64419afa 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -948,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) { | |||
948 | if (!seat->has_focus) { | 948 | if (!seat->has_focus) { |
949 | return NULL; | 949 | return NULL; |
950 | } | 950 | } |
951 | if (wl_list_length(&seat->focus_stack) == 0) { | 951 | if (wl_list_empty(&seat->focus_stack)) { |
952 | return NULL; | 952 | return NULL; |
953 | } | 953 | } |
954 | struct sway_seat_node *current = | 954 | struct sway_seat_node *current = |