summaryrefslogtreecommitdiff
path: root/src/gs-grab-x11.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2015-12-13 16:12:20 +0100
committerWolfgang Ulbrich <[email protected]>2015-12-13 16:12:20 +0100
commit77a6698715849b735d41b40c319936eea670ce3d (patch)
tree77daf1b821f29dcc754d8d317ce4107577d4e654 /src/gs-grab-x11.c
parentc654bc42b3c6b08fc094b6e4bf70bf123c3e42e8 (diff)
downloadmate-screensaver-77a6698715849b735d41b40c319936eea670ce3d.tar.bz2
mate-screensaver-77a6698715849b735d41b40c319936eea670ce3d.tar.xz
GTK3: don't use deprecated gdk_cursor_new
Diffstat (limited to 'src/gs-grab-x11.c')
-rw-r--r--src/gs-grab-x11.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gs-grab-x11.c b/src/gs-grab-x11.c
index 421398b..004fddd 100644
--- a/src/gs-grab-x11.c
+++ b/src/gs-grab-x11.c
@@ -204,12 +204,20 @@ gs_grab_get_mouse (GSGrab *grab,
gboolean hide_cursor)
{
GdkGrabStatus status;
+#if GTK_CHECK_VERSION (3, 16, 0)
+ GdkDisplay *display;
+#endif
GdkCursor *cursor;
g_return_val_if_fail (window != NULL, FALSE);
g_return_val_if_fail (screen != NULL, FALSE);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ display = gtk_widget_get_display (GTK_WIDGET (window));
+ cursor = gdk_cursor_new_for_display (display, GDK_BLANK_CURSOR);
+#else
cursor = gdk_cursor_new (GDK_BLANK_CURSOR);
+#endif
gs_debug ("Grabbing mouse widget=%X", (guint32) GDK_WINDOW_XID (window));
status = gdk_pointer_grab (window, TRUE, 0, NULL,