seat: don't traverse the list to check if it's empty
Found by introspection. Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
This commit is contained in:
parent
707f3ad275
commit
cd3c2f4553
|
@ -948,7 +948,7 @@ struct sway_node *seat_get_focus(struct sway_seat *seat) {
|
||||||
if (!seat->has_focus) {
|
if (!seat->has_focus) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (wl_list_length(&seat->focus_stack) == 0) {
|
if (wl_list_empty(&seat->focus_stack)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
struct sway_seat_node *current =
|
struct sway_seat_node *current =
|
||||||
|
|
Loading…
Reference in a new issue