From 5e1f70e13fe050efe69c91f6bedfbe554c0625cb Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 8 Nov 2012 17:34:04 +0000 Subject: [PATCH] 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 --- src/gtk/cursor.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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() { } -- 2.45.2