commit f9a276544b40e74c5c0c0e2be99b950c6c474edf
parent 707f3ad2750d74a46ff859439e87acc661b599f5
Author: emersion <contact@emersion.fr>
Date: Sat, 27 Oct 2018 21:22:03 +0200
Merge pull request #3003 from Hi-Angel/master
seat: don't traverse the list to check if it's empty
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sway/input/seat.c b/sway/input/seat.c
@@ -948,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) {
if (!seat->has_focus) {
return NULL;
}
- if (wl_list_length(&seat->focus_stack) == 0) {
+ if (wl_list_empty(&seat->focus_stack)) {
return NULL;
}
struct sway_seat_node *current =