[gtk+] wayland: Ignore setting the same cursor theme as was already set



commit 7372ddd2a1bed3c085cd8a23765aaa442735f48b
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Mar 13 15:43:49 2015 +0800

    wayland: Ignore setting the same cursor theme as was already set
    
    If the name and size of the theme is identical to the current
    configuration, do nothing.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=746141

 gdk/wayland/gdkdisplay-wayland.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 5caf0e1..dd06018 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -586,6 +586,10 @@ gdk_wayland_display_set_cursor_theme (GdkDisplay  *display,
   g_assert (wayland_display);
   g_assert (wayland_display->shm);
 
+  if (g_strcmp0 (name, wayland_display->cursor_theme_name) == 0 &&
+      wayland_display->cursor_theme_size == size)
+    return;
+
   theme = wl_cursor_theme_load (name, size, wayland_display->shm);
   if (theme == NULL)
     {


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