[gnome-screenshot: 1/3] area-selection: replace deprecated gdk_cursor_new



commit 234f2c5637e7da8f28ce1fcd203ee3d5f0947421
Author: Jente Hidskes <hjdskes gmail com>
Date:   Wed Dec 9 23:51:29 2015 +0100

    area-selection: replace deprecated gdk_cursor_new

 src/screenshot-area-selection.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/screenshot-area-selection.c b/src/screenshot-area-selection.c
index b74aa22..820b88b 100644
--- a/src/screenshot-area-selection.c
+++ b/src/screenshot-area-selection.c
@@ -226,6 +226,7 @@ emit_select_callback_in_idle (gpointer user_data)
 static void
 screenshot_select_area_x11_async (CallbackData *cb_data)
 {
+  GdkDisplay *display;
   GdkCursor *cursor;
   select_area_filter_data  data;
   GdkDeviceManager *manager;
@@ -245,8 +246,9 @@ screenshot_select_area_x11_async (CallbackData *cb_data)
   g_signal_connect (data.window, "button-release-event", G_CALLBACK (select_area_button_release), &data);
   g_signal_connect (data.window, "motion-notify-event", G_CALLBACK (select_area_motion_notify), &data);
 
-  cursor = gdk_cursor_new (GDK_CROSSHAIR);
-  manager = gdk_display_get_device_manager (gdk_display_get_default ());
+  display = gtk_widget_get_display (data.window);
+  cursor = gdk_cursor_new_for_display (display, GDK_CROSSHAIR);
+  manager = gdk_display_get_device_manager (display);
   pointer = gdk_device_manager_get_client_pointer (manager);
   keyboard = gdk_device_get_associated_device (pointer);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]