gdk: Use g_object_(un)ref instead of gdk_cursor_(un)ref
This commit is contained in:

committed by
Matthias Clasen

parent
768b425ce6
commit
a9637f05b6
@ -565,7 +565,7 @@ gdk_window_finalize (GObject *object)
|
|||||||
cairo_region_destroy (window->input_shape);
|
cairo_region_destroy (window->input_shape);
|
||||||
|
|
||||||
if (window->cursor)
|
if (window->cursor)
|
||||||
gdk_cursor_unref (window->cursor);
|
g_object_unref (window->cursor);
|
||||||
|
|
||||||
if (window->device_cursor)
|
if (window->device_cursor)
|
||||||
g_hash_table_destroy (window->device_cursor);
|
g_hash_table_destroy (window->device_cursor);
|
||||||
@ -1391,8 +1391,8 @@ gdk_window_new (GdkWindow *parent,
|
|||||||
if (window->parent)
|
if (window->parent)
|
||||||
window->parent->children = g_list_prepend (window->parent->children, window);
|
window->parent->children = g_list_prepend (window->parent->children, window);
|
||||||
|
|
||||||
window->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
|
window->device_cursor = g_hash_table_new_full (NULL, NULL,
|
||||||
(GDestroyNotify) gdk_cursor_unref);
|
NULL, g_object_unref);
|
||||||
|
|
||||||
native = _gdk_native_windows; /* Default */
|
native = _gdk_native_windows; /* Default */
|
||||||
if (window->parent->window_type == GDK_WINDOW_ROOT)
|
if (window->parent->window_type == GDK_WINDOW_ROOT)
|
||||||
@ -6674,14 +6674,14 @@ gdk_window_set_cursor (GdkWindow *window,
|
|||||||
|
|
||||||
if (window->cursor)
|
if (window->cursor)
|
||||||
{
|
{
|
||||||
gdk_cursor_unref (window->cursor);
|
g_object_unref (window->cursor);
|
||||||
window->cursor = NULL;
|
window->cursor = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!GDK_WINDOW_DESTROYED (window))
|
if (!GDK_WINDOW_DESTROYED (window))
|
||||||
{
|
{
|
||||||
if (cursor)
|
if (cursor)
|
||||||
window->cursor = gdk_cursor_ref (cursor);
|
window->cursor = g_object_ref (cursor);
|
||||||
|
|
||||||
_gdk_display_pointer_info_foreach (display,
|
_gdk_display_pointer_info_foreach (display,
|
||||||
update_cursor_foreach,
|
update_cursor_foreach,
|
||||||
@ -6751,7 +6751,7 @@ gdk_window_set_device_cursor (GdkWindow *window,
|
|||||||
if (!cursor)
|
if (!cursor)
|
||||||
g_hash_table_remove (window->device_cursor, device);
|
g_hash_table_remove (window->device_cursor, device);
|
||||||
else
|
else
|
||||||
g_hash_table_replace (window->device_cursor, device, gdk_cursor_ref (cursor));
|
g_hash_table_replace (window->device_cursor, device, g_object_ref (cursor));
|
||||||
|
|
||||||
if (!GDK_WINDOW_DESTROYED (window))
|
if (!GDK_WINDOW_DESTROYED (window))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user