1
0
Fork 0

clutter/stage: Switch to clutter_seat_peek_devices()

Switch from clutter_seat_list_devices() to the new peek_devices() method
of ClutterSeat in cases where we're only looping through the returned
list without manipulating it. This way we don't have to unnecessarily
copy around the list of devices.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1275
This commit is contained in:
Jonas Dreßler 2020-05-29 22:47:00 +02:00 committed by verdre
parent 45c14f74b4
commit 8de91f1053

View file

@ -1409,12 +1409,12 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
ClutterBackend *backend;
ClutterSeat *seat;
GSList *updating = NULL;
GList *l, *devices;
const GList *l, *devices;
graphene_point_t point;
backend = clutter_get_default_backend ();
seat = clutter_backend_get_default_seat (backend);
devices = clutter_seat_list_devices (seat);
devices = clutter_seat_peek_devices (seat);
for (l = devices; l; l = l->next)
{
@ -1454,8 +1454,6 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
}
}
g_list_free (devices);
return updating;
}