tooltip: Stop using gdk_display_get_default_cursor_size
authorMatthias Clasen <mclasen@redhat.com>
Wed, 17 Jan 2018 04:20:12 +0000 (23:20 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 17 Jan 2018 04:25:50 +0000 (23:25 -0500)
It makes more sense to use the actual cursor theme size here.

gtk/gtktooltip.c

index 91f1d54b755a341135d59a2396e49d3f0cf26755..eed1a56380794d04d3b531c6470ced2844e43202 100644 (file)
@@ -708,7 +708,9 @@ gtk_tooltip_position (GtkTooltip *tooltip,
 
   /* Position the tooltip */
 
-  cursor_size = gdk_display_get_default_cursor_size (display);
+  g_object_get (gtk_widget_get_settings (GTK_WIDGET (tooltip->current_window)),
+                "gtk-cursor-theme-size", &cursor_size,
+                NULL);
 
   /* Try below */
   x = bounds.x + bounds.width / 2 - width / 2;