summaryrefslogtreecommitdiff
path: root/src/gs-lock-plug.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-lock-plug.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-lock-plug.c')
-rw-r--r--src/gs-lock-plug.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 9585a05..b8f5294 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -1556,12 +1556,20 @@ logout_button_clicked (GtkButton *button,
void
gs_lock_plug_set_busy (GSLockPlug *plug)
{
+#if GTK_CHECK_VERSION (3, 16, 0)
+ GdkDisplay *display;
+#endif
GdkCursor *cursor;
GtkWidget *top_level;
top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ display = gtk_widget_get_display (GTK_WIDGET (plug));
+ cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
+#else
cursor = gdk_cursor_new (GDK_WATCH);
+#endif
gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor);
#if GTK_CHECK_VERSION (3, 0, 0)
@@ -1574,12 +1582,20 @@ gs_lock_plug_set_busy (GSLockPlug *plug)
void
gs_lock_plug_set_ready (GSLockPlug *plug)
{
+#if GTK_CHECK_VERSION (3, 16, 0)
+ GdkDisplay *display;
+#endif
GdkCursor *cursor;
GtkWidget *top_level;
top_level = gtk_widget_get_toplevel (GTK_WIDGET (plug));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ display = gtk_widget_get_display (GTK_WIDGET (plug));
+ cursor = gdk_cursor_new_for_display (display, GDK_LEFT_PTR);
+#else
cursor = gdk_cursor_new (GDK_LEFT_PTR);
+#endif
gdk_window_set_cursor (gtk_widget_get_window (top_level), cursor);
#if GTK_CHECK_VERSION (3, 0, 0)
g_object_unref (cursor);