Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 889734
Collapse All | Expand All

(-)a/gdk/wayland/gdkdisplay-wayland.c (-8 / +29 lines)
Lines 991-996 gdk_wayland_display_get_toplevel_surfaces (GdkDisplay *display) Link Here
991
  return GDK_WAYLAND_DISPLAY (display)->toplevels;
991
  return GDK_WAYLAND_DISPLAY (display)->toplevels;
992
}
992
}
993
993
994
static struct wl_cursor_theme *
995
try_load_theme (GdkWaylandDisplay *display_wayland,
996
                const char        *dir,
997
                gboolean           dotdir,
998
                const char        *name,
999
                int                size)
1000
{
1001
  struct wl_cursor_theme *theme = NULL;
1002
  char *path;
1003
1004
  path = g_build_filename (dir, dotdir ? ".icons" : "icons", name, "cursors", NULL);
1005
1006
  if (g_file_test (path, G_FILE_TEST_IS_DIR))
1007
    theme = wl_cursor_theme_create (path, size, display_wayland->shm);
1008
1009
  g_free (path);
1010
1011
  return theme;
1012
}
1013
994
static struct wl_cursor_theme *
1014
static struct wl_cursor_theme *
995
get_cursor_theme (GdkWaylandDisplay *display_wayland,
1015
get_cursor_theme (GdkWaylandDisplay *display_wayland,
996
                  const char *name,
1016
                  const char *name,
Lines 1000-1015 get_cursor_theme (GdkWaylandDisplay *display_wayland, Link Here
1000
  struct wl_cursor_theme *theme = NULL;
1020
  struct wl_cursor_theme *theme = NULL;
1001
  int i;
1021
  int i;
1002
1022
1023
  theme = try_load_theme (display_wayland, g_get_user_data_dir (), FALSE, name, size);
1024
  if (theme)
1025
    return theme;
1026
1027
  theme = try_load_theme (display_wayland, g_get_home_dir (), TRUE, name, size);
1028
  if (theme)
1029
    return theme;
1030
1003
  xdg_data_dirs = g_get_system_data_dirs ();
1031
  xdg_data_dirs = g_get_system_data_dirs ();
1004
  for (i = 0; xdg_data_dirs[i]; i++)
1032
  for (i = 0; xdg_data_dirs[i]; i++)
1005
    {
1033
    {
1006
      char *path = g_build_filename (xdg_data_dirs[i], "icons", name, "cursors", NULL);
1034
      theme = try_load_theme (display_wayland, xdg_data_dirs[i], FALSE, name, size);
1007
1008
      if (g_file_test (path, G_FILE_TEST_IS_DIR))
1009
        theme = wl_cursor_theme_create (path, size, display_wayland->shm);
1010
1011
      g_free (path);
1012
1013
      if (theme)
1035
      if (theme)
1014
        return theme;
1036
        return theme;
1015
    }
1037
    }
1016
- 

Return to bug 889734