mirror of
https://github.com/brl/mutter.git
synced 2024-12-22 11:02:05 +00:00
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:
parent
45c14f74b4
commit
8de91f1053
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user