From 4d59233ba996e6955551f782fc212a36e2c90ad5 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 19 Oct 2015 20:31:57 -0400 Subject: [PATCH] Don't use g_slist_next in the x11 backend We generally use ->next directly. --- gdk/x11/gdkcursor-x11.c | 8 ++++---- gdk/x11/gdkdevice-core-x11.c | 2 +- gdk/x11/gdkdevice-xi2.c | 2 +- gdk/x11/gdkwindow-x11.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c index 540f48ef7d..d7388f1186 100644 --- a/gdk/x11/gdkcursor-x11.c +++ b/gdk/x11/gdkcursor-x11.c @@ -155,13 +155,13 @@ _gdk_x11_cursor_display_finalize (GdkDisplay *display) /* Remove this item from the list */ *(itemp) = item->next; olditem = item; - item = g_slist_next (item); + item = item->next; g_slist_free_1 (olditem); - } - else + } + else { itemp = &(item->next); - item = g_slist_next (item); + item = item->next; } } } diff --git a/gdk/x11/gdkdevice-core-x11.c b/gdk/x11/gdkdevice-core-x11.c index 2c1fb5648f..1c10a13954 100644 --- a/gdk/x11/gdkdevice-core-x11.c +++ b/gdk/x11/gdkdevice-core-x11.c @@ -474,7 +474,7 @@ gdk_x11_device_core_window_at_position (GdkDevice *device, pointer_window = None; screen = gdk_display_get_screen (display, 0); toplevels = gdk_screen_get_toplevel_windows (screen); - for (list = toplevels; list != NULL; list = g_list_next (list)) + for (list = toplevels; list != NULL; list = list->next) { window = GDK_WINDOW (list->data); impl = GDK_WINDOW_IMPL_X11 (window->impl); diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 515840b83a..a77002e700 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -544,7 +544,7 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device, screen = gdk_display_get_screen (display, 0); toplevels = gdk_screen_get_toplevel_windows (screen); - for (list = toplevels; list != NULL; list = g_list_next (list)) + for (list = toplevels; list != NULL; list = list->next) { window = GDK_WINDOW (list->data); xwindow = GDK_WINDOW_XID (window); diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 2ae8105d7d..3baa1a1f80 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -3864,7 +3864,7 @@ gdk_x11_window_set_icon_list (GdkWindow *window, n++; size += 2 + width * height; - l = g_list_next (l); + l = l->next; } data = g_malloc (size * sizeof (gulong)); @@ -3903,7 +3903,7 @@ gdk_x11_window_set_icon_list (GdkWindow *window, } } - l = g_list_next (l); + l = l->next; n--; }