[gtk+] wayland: Pull the cursor theme name out from the setting for it



commit 93c3fec1257228605cd6324699410ca6db3bf01d
Author: Rob Bradford <rob linux intel com>
Date:   Tue Feb 5 13:08:14 2013 +0000

    wayland: Pull the cursor theme name out from the setting for it
    
    This avoids us using the default theme and allows us to use a wider range of
    cursors.

 gdk/wayland/gdkdisplay-wayland.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index abf46f2..5829eb4 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -592,17 +592,24 @@ static void
 _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *wayland_display)
 {
   guint w, h;
-  gchar *theme_name = NULL; /* FIXME: Do something here */
+  const gchar *theme_name;
+  GValue v = G_VALUE_INIT;
 
   g_assert (wayland_display);
   g_assert (wayland_display->shm);
 
   _gdk_wayland_display_get_default_cursor_size (GDK_DISPLAY (wayland_display),
                                                 &w, &h);
+  g_value_init (&v, G_TYPE_STRING);
+  if (gdk_setting_get ("gtk-cursor-theme-name", &v))
+    theme_name = g_value_get_string (&v);
+  else
+    theme_name = "default";
 
   wayland_display->cursor_theme = wl_cursor_theme_load (theme_name,
                                                         w,
                                                         wayland_display->shm);
+  g_value_unset (&v);
 }
 
 guint32



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