From f9d1d89bd4e367389c65b767d805dfaff995373c Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Mon, 5 Oct 2015 21:14:54 +0200 Subject: [PATCH] Use the widget's display Signed-off-by: Sebastian Ramacher --- zathura/callbacks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zathura/callbacks.c b/zathura/callbacks.c index 228cb80..dd6070c 100644 --- a/zathura/callbacks.c +++ b/zathura/callbacks.c @@ -622,7 +622,8 @@ cb_page_widget_link(ZathuraPage* page, void* data) bool enter = (bool) data; GdkWindow* window = gtk_widget_get_parent_window(GTK_WIDGET(page)); - GdkCursor* cursor = gdk_cursor_new_for_display(gdk_display_get_default(), enter == true ? GDK_HAND1 : GDK_LEFT_PTR); + GdkDisplay* display = gtk_widget_get_display(GTK_WIDGET(page)); + GdkCursor* cursor = gdk_cursor_new_for_display(display, enter == true ? GDK_HAND1 : GDK_LEFT_PTR); gdk_window_set_cursor(window, cursor); g_object_unref(cursor); }