[mutter] clutter/stage: Switch to clutter_seat_peek_devices()
- From: verdre <jonasd src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] clutter/stage: Switch to clutter_seat_peek_devices()
- Date: Tue, 16 Jun 2020 11:00:25 +0000 (UTC)
commit 8de91f1053d3584b6cd1df513837cc7ecec67b01
Author: Jonas Dreßler <verdre v0yd nl>
Date: Fri May 29 22:47:00 2020 +0200
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
clutter/clutter/clutter-stage.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index fd40393e2e..425980ab8a 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]