]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/cursor.cpp
Partial fix for #15196: wxRichTextCell caret issues (dghart)
[wxWidgets.git] / src / gtk / cursor.cpp
index 152796d630e992b875fcaf28ef888a332a127834..aab088f64adfd62207dd2a0ab52952e1b0ef9f27 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/cursor.cpp
 // Purpose:     wxCursor implementation
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -14,7 +13,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 +49,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 +70,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxCursor, wxGDIObject)
 // used in the following two ctors
 extern GtkWidget *wxGetRootWindow();
 
-
 wxCursor::wxCursor()
 {
 }