diff options
author | Anatoly Spektor <aspektor@redhat.com> | 2012-10-02 08:59:30 -0400 |
---|---|---|
committer | Alexander Kurtakov <akurtako@redhat.com> | 2012-10-02 20:38:06 +0300 |
commit | ffe5186c17b22da6dd8ec55ad2dd5f424adf803a (patch) | |
tree | 48586f0c1626d1296c6dc165a63435dc6562dacf /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java | |
parent | ed548011f4f983818b96640d346d126775013185 (diff) | |
download | eclipse.platform.swt-ffe5186c17b22da6dd8ec55ad2dd5f424adf803a.tar.gz eclipse.platform.swt-ffe5186c17b22da6dd8ec55ad2dd5f424adf803a.tar.xz eclipse.platform.swt-ffe5186c17b22da6dd8ec55ad2dd5f424adf803a.zip |
Replace gdk_cursor_unref with g_object_unref for GTK+ 3
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java index 6ac6cb7412..c473b56e38 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java @@ -449,7 +449,7 @@ long /*int*/ createCursor(byte[] sourceData, byte[] maskData, int width, int hei } void destroy() { - OS.gdk_cursor_unref(handle); + gdk_cursor_unref(handle); handle = 0; } @@ -530,4 +530,12 @@ public String toString () { return "Cursor {" + handle + "}"; } +void gdk_cursor_unref (long /*int*/ cursor) { + if (OS.GTK_VERSION >= OS.VERSION(3, 0, 0)) { + OS.g_object_unref (cursor); + } else { + OS.gdk_cursor_unref(cursor); + } +} + } |