_gdk_broadway_cursor_display_finalize (GDK_DISPLAY_OBJECT(broadway_display));
/* input GdkDevice list */
- g_list_foreach (broadway_display->input_devices, (GFunc) g_object_unref, NULL);
- g_list_free (broadway_display->input_devices);
+ g_list_free_full (broadway_display->input_devices, g_object_unref);
/* Free all GdkScreens */
g_object_unref (broadway_display->screens[0]);
g_free (broadway_display->screens);
{
GList *list = value;
- g_list_foreach (list, (GFunc) free_device_grab, NULL);
- g_list_free (list);
+ g_list_free_full (list, (GDestroyNotify) free_device_grab);
return TRUE;
}
device_manager = gdk_display_get_device_manager (GDK_DISPLAY (object));
- g_list_foreach (display->queued_events, (GFunc)gdk_event_free, NULL);
- g_list_free (display->queued_events);
+ g_list_free_full (display->queued_events, (GDestroyNotify) gdk_event_free);
display->queued_events = NULL;
display->queued_tail = NULL;
window->clip_region_with_children = NULL;
}
- if (window->outstanding_moves)
- {
- g_list_foreach (window->outstanding_moves, (GFunc)gdk_window_region_move_free, NULL);
- g_list_free (window->outstanding_moves);
- window->outstanding_moves = NULL;
- }
+ g_list_free_full (window->outstanding_moves, (GDestroyNotify) gdk_window_region_move_free);
+ window->outstanding_moves = NULL;
}
break;
}
}
}
- g_list_foreach (children, (GFunc)g_object_unref, NULL);
- g_list_free (children);
+ g_list_free_full (children, g_object_unref);
}
{
GdkQuartzDisplay *display_quartz = GDK_QUARTZ_DISPLAY (object);
- g_list_foreach (display_quartz->input_devices, (GFunc) g_object_unref, NULL);
- g_list_free (display_quartz->input_devices);
+ g_list_free_full (display_quartz->input_devices, g_object_unref);
G_OBJECT_CLASS (gdk_quartz_display_parent_class)->finalize (object);
}
device_manager_core = GDK_DEVICE_MANAGER_CORE (object);
- g_list_foreach (device_manager_core->devices, free_device, NULL);
- g_list_free (device_manager_core->devices);
+ g_list_free_full (device_manager_core->devices, free_device);
G_OBJECT_CLASS (gdk_device_manager_core_parent_class)->finalize (object);
}
g_object_unref (display_wayland->keymap);
/* input GdkDevice list */
- g_list_foreach (display_wayland->input_devices, (GFunc) g_object_unref, NULL);
- g_list_free (display_wayland->input_devices);
+ g_list_free_full (display_wayland->input_devices, g_object_unref);
g_object_unref (display_wayland->screen);
GdkX11DeviceManagerXI *device_manager;
device_manager = GDK_X11_DEVICE_MANAGER_XI (object);
- g_list_foreach (device_manager->devices, (GFunc) g_object_unref, NULL);
- g_list_free (device_manager->devices);
+
+ g_list_free_full (device_manager->devices, g_object_unref);
device_manager->devices = NULL;
if (device_manager->id_table != NULL)
g_slist_free (display_x11->event_types);
/* input GdkDevice list */
- g_list_foreach (display_x11->input_devices, (GFunc) g_object_unref, NULL);
- g_list_free (display_x11->input_devices);
+ g_list_free_full (display_x11->input_devices, g_object_unref);
/* input GdkWindow list */
- g_list_foreach (display_x11->input_windows, (GFunc) g_free, NULL);
- g_list_free (display_x11->input_windows);
+ g_list_free_full (display_x11->input_windows, g_free);
/* Free all GdkScreens */
for (i = 0; i < ScreenCount (display_x11->xdisplay); i++)