From 98ca6a65eaa58ce9c34c8a52754b6ce269e74d98 Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 7 Aug 2016 11:10:10 +0200 Subject: GTK+-3 Baobab: use gdk_cursor_new_for_display --- baobab/src/baobab.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/baobab/src/baobab.c b/baobab/src/baobab.c index 2620fcbf..9497e850 100644 --- a/baobab/src/baobab.c +++ b/baobab/src/baobab.c @@ -76,10 +76,14 @@ baobab_set_busy (gboolean busy) static GdkCursor *busy_cursor = NULL; GdkCursor *cursor = NULL; GdkWindow *window; + GdkDisplay *display; + + window = gtk_widget_get_window (baobab.window); if (busy == TRUE) { - if (!busy_cursor) { - busy_cursor = gdk_cursor_new (GDK_WATCH); + if (!busy_cursor && window) { + display = gtk_widget_get_display (baobab.window); + busy_cursor = gdk_cursor_new_for_display (display, GDK_WATCH); } cursor = busy_cursor; @@ -87,7 +91,6 @@ baobab_set_busy (gboolean busy) gtk_spinner_start (GTK_SPINNER (baobab.spinner)); baobab_chart_freeze_updates (baobab.rings_chart); - baobab_chart_freeze_updates (baobab.treemap_chart); gtk_widget_set_sensitive (baobab.chart_type_combo, FALSE); @@ -103,7 +106,6 @@ baobab_set_busy (gboolean busy) } /* change the cursor */ - window = gtk_widget_get_window (baobab.window); if (window) { gdk_window_set_cursor (window, cursor); } -- cgit v1.2.1