fix GdkCursor memory leaks
This commit is contained in:
parent
9f8deb74a7
commit
3e75b231b0
@ -116,6 +116,7 @@ void gtk_assert_dialog_process_backtrace (GtkAssertDialog *dlg)
|
||||
GdkDisplay* display = gdk_window_get_display(parent);
|
||||
GdkCursor* cur = gdk_cursor_new_for_display(display, GDK_WATCH);
|
||||
gdk_window_set_cursor (parent, cur);
|
||||
g_object_unref(cur);
|
||||
gdk_flush ();
|
||||
|
||||
(*dlg->callback)(dlg->userdata);
|
||||
|
@ -288,6 +288,8 @@ gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion *gdk_event,
|
||||
cursor = gdk_cursor_new_for_display(display, GDK_BOTTOM_RIGHT_CORNER);
|
||||
}
|
||||
gdk_window_set_cursor(window, cursor);
|
||||
if (cursor)
|
||||
g_object_unref(cursor);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user