fix GdkCursor memory leaks

This commit is contained in:
Paul Cornett 2015-11-02 08:50:39 -08:00
parent 9f8deb74a7
commit 3e75b231b0
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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;
}