Revert "wayland: Look for cursor themes in $HOME"
This reverts commit 3f1536632f
.
This commit is contained in:
@ -1112,26 +1112,6 @@ gdk_wayland_display_init (GdkWaylandDisplay *display)
|
|||||||
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
display->monitors = g_ptr_array_new_with_free_func (g_object_unref);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct wl_cursor_theme *
|
|
||||||
try_load_theme (GdkWaylandDisplay *display_wayland,
|
|
||||||
const char *dir,
|
|
||||||
gboolean dotdir,
|
|
||||||
const char *name,
|
|
||||||
int size)
|
|
||||||
{
|
|
||||||
struct wl_cursor_theme *theme = NULL;
|
|
||||||
char *path;
|
|
||||||
|
|
||||||
path = g_build_filename (dir, dotdir ? ".icons" : "icons", name, "cursors", NULL);
|
|
||||||
|
|
||||||
if (g_file_test (path, G_FILE_TEST_IS_DIR))
|
|
||||||
theme = wl_cursor_theme_create (path, size, display_wayland->shm);
|
|
||||||
|
|
||||||
g_free (path);
|
|
||||||
|
|
||||||
return theme;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct wl_cursor_theme *
|
static struct wl_cursor_theme *
|
||||||
get_cursor_theme (GdkWaylandDisplay *display_wayland,
|
get_cursor_theme (GdkWaylandDisplay *display_wayland,
|
||||||
const char *name,
|
const char *name,
|
||||||
@ -1141,18 +1121,16 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland,
|
|||||||
struct wl_cursor_theme *theme = NULL;
|
struct wl_cursor_theme *theme = NULL;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
theme = try_load_theme (display_wayland, g_get_user_data_dir (), FALSE, name, size);
|
|
||||||
if (theme)
|
|
||||||
return theme;
|
|
||||||
|
|
||||||
theme = try_load_theme (display_wayland, g_get_home_dir (), TRUE, name, size);
|
|
||||||
if (theme)
|
|
||||||
return theme;
|
|
||||||
|
|
||||||
xdg_data_dirs = g_get_system_data_dirs ();
|
xdg_data_dirs = g_get_system_data_dirs ();
|
||||||
for (i = 0; xdg_data_dirs[i]; i++)
|
for (i = 0; xdg_data_dirs[i]; i++)
|
||||||
{
|
{
|
||||||
theme = try_load_theme (display_wayland, xdg_data_dirs[i], FALSE, name, size);
|
char *path = g_build_filename (xdg_data_dirs[i], "icons", name, "cursors", NULL);
|
||||||
|
|
||||||
|
if (g_file_test (path, G_FILE_TEST_IS_DIR))
|
||||||
|
theme = wl_cursor_theme_create (path, size, display_wayland->shm);
|
||||||
|
|
||||||
|
g_free (path);
|
||||||
|
|
||||||
if (theme)
|
if (theme)
|
||||||
return theme;
|
return theme;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user