summaryrefslogtreecommitdiffstats
path: root/src/ui/widget/selected-style.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/widget/selected-style.cpp')
-rw-r--r--src/ui/widget/selected-style.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp
index ab7b99237..faf518bbd 100644
--- a/src/ui/widget/selected-style.cpp
+++ b/src/ui/widget/selected-style.cpp
@@ -1259,7 +1259,11 @@ RotateableSwatch::do_motion(double by, guint modifier) {
g_object_unref (bitmap);
g_object_unref (mask);
gdk_window_set_cursor(gtk_widget_get_window(w), cr);
+#if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(cr);
+#else
gdk_cursor_unref(cr);
+#endif
cr_set = true;
}
}
@@ -1314,7 +1318,11 @@ RotateableSwatch::do_release(double by, guint modifier) {
GtkWidget *w = GTK_WIDGET(gobj());
gdk_window_set_cursor(gtk_widget_get_window(w), NULL);
if (cr) {
+#if GTK_CHECK_VERSION(3,0,0)
+ g_object_unref(cr);
+#else
gdk_cursor_unref (cr);
+#endif
cr = NULL;
}
cr_set = false;