[gtk+/wip/drop-useless-api: 2/7] tooltip: Stop using	gdk_display_get_default_cursor_size
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gtk+/wip/drop-useless-api: 2/7] tooltip: Stop using	gdk_display_get_default_cursor_size
- Date: Wed, 17 Jan 2018 04:27:02 +0000 (UTC)
commit 35c78a995e3c56e74b81235c2af0d58313345ee0
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jan 16 23:20:12 2018 -0500
    tooltip: Stop using gdk_display_get_default_cursor_size
    
    It makes more sense to use the actual cursor theme size here.
 gtk/gtktooltip.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 91f1d54..eed1a56 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -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;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]