summaryrefslogtreecommitdiff
path: root/src/gs-lock-plug.c
diff options
context:
space:
mode:
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);