wayland: Ignore setting the same cursor theme as was already set
authorJonas Ådahl <jadahl@gmail.com>
Fri, 13 Mar 2015 07:43:49 +0000 (15:43 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Mon, 16 Mar 2015 11:53:37 +0000 (19:53 +0800)
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

index 5caf0e168405b7f0be292b3c73fb770215a50ccb..dd06018e51f0ae29c47922e3fdb015b01b14d857 100644 (file)
@@ -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)
     {