[gtk+] wayland: Some cursor cleanups



commit 3a5b478e0f1f63851e503aaf2f12e1d85f76dc5e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Nov 1 22:35:19 2017 -0400

    wayland: Some cursor cleanups
    
    Remove methods that are not used.

 gdk/wayland/gdkcursor-wayland.c  |   36 +-----------------------------------
 gdk/wayland/gdkdevice-wayland.c  |    5 +----
 gdk/wayland/gdkprivate-wayland.h |    4 ++--
 3 files changed, 4 insertions(+), 41 deletions(-)
---
diff --git a/gdk/wayland/gdkcursor-wayland.c b/gdk/wayland/gdkcursor-wayland.c
index cc20bb1..33aa8ef 100644
--- a/gdk/wayland/gdkcursor-wayland.c
+++ b/gdk/wayland/gdkcursor-wayland.c
@@ -331,7 +331,7 @@ _gdk_wayland_cursor_init (GdkWaylandCursor *cursor)
 {
 }
 
-static GdkCursor *
+GdkCursor *
 _gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay  *display,
                                                      const gchar *name,
                                                      guint        scale)
@@ -382,40 +382,6 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay  *display,
   return _gdk_wayland_display_get_cursor_for_name_with_scale (display, name, 1);
 }
 
-GdkCursor *
-_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay    *display,
-                                                     GdkCursorType  cursor_type,
-                                                     guint          scale)
-{
-  GEnumClass *enum_class;
-  GEnumValue *enum_value;
-  gchar *cursor_name;
-  GdkCursor *result;
-
-  enum_class = g_type_class_ref (GDK_TYPE_CURSOR_TYPE);
-  enum_value = g_enum_get_value (enum_class, cursor_type);
-  cursor_name = g_strdup (enum_value->value_nick);
-  g_strdelimit (cursor_name, "-", '_');
-  g_type_class_unref (enum_class);
-
-  result = _gdk_wayland_display_get_cursor_for_name_with_scale (display,
-                                                                cursor_name,
-                                                                scale);
-
-  g_free (cursor_name);
-
-  return result;
-}
-
-GdkCursor *
-_gdk_wayland_display_get_cursor_for_type (GdkDisplay    *display,
-                                          GdkCursorType  cursor_type)
-{
-  return _gdk_wayland_display_get_cursor_for_type_with_scale (display,
-                                                              cursor_type,
-                                                              1);
-}
-
 static void
 buffer_release_callback (void             *_data,
                          struct wl_buffer *wl_buffer)
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 9d0ba0d..454c546 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -502,10 +502,7 @@ gdk_wayland_device_set_window_cursor (GdkDevice *device,
   if (!cursor)
     {
       guint scale = pointer->current_output_scale;
-      cursor =
-        _gdk_wayland_display_get_cursor_for_type_with_scale (seat->display,
-                                                             GDK_LEFT_PTR,
-                                                             scale);
+      cursor = _gdk_wayland_display_get_cursor_for_name_with_scale (seat->display, "default", scale);
     }
   else
     _gdk_wayland_cursor_set_scale (cursor, pointer->current_output_scale);
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index cf21217..667c2ac 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -63,8 +63,8 @@ void       _gdk_wayland_display_update_cursors (GdkWaylandDisplay *display);
 struct wl_cursor_theme * _gdk_wayland_display_get_scaled_cursor_theme (GdkWaylandDisplay *display_wayland,
                                                                        guint              scale);
 
-GdkCursor *_gdk_wayland_display_get_cursor_for_type_with_scale (GdkDisplay    *display,
-                                                                GdkCursorType  cursor_type,
+GdkCursor *_gdk_wayland_display_get_cursor_for_name_with_scale (GdkDisplay    *display,
+                                                                const char    *name,
                                                                 guint          scale);
 GdkCursor *_gdk_wayland_display_get_cursor_for_name (GdkDisplay  *display,
                                                     const gchar *name);


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