Merge pull request #3003 from Hi-Angel/master

seat: don't traverse the list to check if it's empty
master
emersion 6 years ago committed by GitHub
commit f9a276544b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save