From: Paul Cornett Date: Thu, 8 Nov 2012 17:34:04 +0000 (+0000) Subject: avoid using deprecated gdk_cursor_unref() with GTK3 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5e1f70e13fe050efe69c91f6bedfbe554c0625cb avoid using deprecated gdk_cursor_unref() with GTK3 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/gtk/cursor.cpp b/src/gtk/cursor.cpp index 152796d630..af25572696 100644 --- a/src/gtk/cursor.cpp +++ b/src/gtk/cursor.cpp @@ -14,7 +14,6 @@ #ifndef WX_PRECOMP #include "wx/window.h" - #include "wx/app.h" #include "wx/image.h" #include "wx/bitmap.h" #include "wx/log.h" @@ -51,10 +50,16 @@ wxCursorRefData::wxCursorRefData() wxCursorRefData::~wxCursorRefData() { - if (m_cursor) gdk_cursor_unref( m_cursor ); + if (m_cursor) + { +#ifdef __WXGTK3__ + g_object_unref(m_cursor); +#else + gdk_cursor_unref(m_cursor); +#endif + } } - //----------------------------------------------------------------------------- // wxCursor //----------------------------------------------------------------------------- @@ -66,7 +71,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxGDIObject) // used in the following two ctors extern GtkWidget *wxGetRootWindow(); - wxCursor::wxCursor() { }