[Xfce4-commits] [xfce/exo] 01/01: Resolve gdk_cursor_* deprecated warnings, thanks f2404! https://github.com/xfce-mirror/exo/pull/4
noreply at xfce.org
noreply at xfce.org
Sat Aug 20 23:57:24 CEST 2016
This is an automated email from the git hooks/post-receive script.
bluesabre pushed a commit to branch master
in repository xfce/exo.
commit f421986feea8b84b8e26469eda10053118e58616
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Sat Aug 20 17:56:57 2016 -0400
Resolve gdk_cursor_* deprecated warnings, thanks f2404!
https://github.com/xfce-mirror/exo/pull/4
---
exo/exo-tree-view.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/exo/exo-tree-view.c b/exo/exo-tree-view.c
index ae87663..137ee96 100644
--- a/exo/exo-tree-view.c
+++ b/exo/exo-tree-view.c
@@ -43,6 +43,18 @@
+/* resurrect dead gdk apis for Gtk3
+ * This is easier than using #ifs everywhere
+ */
+#if GTK_CHECK_VERSION (3, 0, 0)
+
+# ifdef gdk_cursor_unref
+# undef gdk_cursor_unref
+# endif
+# define gdk_cursor_unref(cursor) g_object_unref (cursor)
+
+# endif
+
#define EXO_TREE_VIEW_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
EXO_TYPE_TREE_VIEW, ExoTreeViewPrivate))
@@ -516,7 +528,7 @@ exo_tree_view_motion_notify_event (GtkWidget *widget,
if (G_LIKELY (path != NULL))
{
/* setup the hand cursor to indicate that the row at the pointer can be activated with a single click */
- cursor = gdk_cursor_new (GDK_HAND2);
+ cursor = gdk_cursor_new_for_display (gdk_window_get_display (event->window), GDK_HAND2);
gdk_window_set_cursor (event->window, cursor);
gdk_cursor_unref (cursor);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list