[gtk+/wip/otte/gtk4: 6/121] x11: Use GdkMonitor APIs



commit 83c292f508f2497e193a1ed90bdd44ae2ffdcfc4
Author: Benjamin Otte <otte redhat com>
Date:   Sun Sep 4 21:52:33 2016 +0200

    x11: Use GdkMonitor APIs

 gdk/x11/gdkcursor-x11.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index 3cce62f..7f14873 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -358,7 +358,7 @@ gdk_x11_cursor_get_surface (GdkCursor *cursor,
   /* Assume the currently set cursor was defined for the screen
      scale */
   scale =
-    gdk_screen_get_monitor_scale_factor (gdk_display_get_default_screen (display), 0);
+    gdk_monitor_get_scale_factor (gdk_display_get_primary_monitor (display));
 
   surface = gdk_window_create_similar_image_surface (NULL,
                                                     CAIRO_FORMAT_ARGB32,
@@ -590,7 +590,7 @@ _gdk_x11_display_get_cursor_for_surface (GdkDisplay *display,
   else
     {
       target_scale =
-       gdk_screen_get_monitor_scale_factor (gdk_display_get_default_screen (display), 0);
+        gdk_monitor_get_scale_factor (gdk_display_get_primary_monitor (display));
       xcimage = create_cursor_image (surface, x, y, target_scale);
       xcursor = XcursorImageLoadCursor (GDK_DISPLAY_XDISPLAY (display), xcimage);
       XcursorImageDestroy (xcimage);


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