Commit e61df371 authored by Matthias Clasen's avatar Matthias Clasen

Prevent criticals when initializing a Wayland display

When we call _gdk_wayland_display_load_cursor_theme during
the initial opening of the first display, gdk_setting_get does
not work yet, since it relies on the default display/screen
being set, which only happens after open returns.
Instead, just use the screen of this display.
parent ed5ef041
......@@ -650,14 +650,14 @@ _gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *wayland_display)
g_assert (wayland_display->shm);
g_value_init (&v, G_TYPE_INT);
if (gdk_setting_get ("gtk-cursor-theme-size", &v))
if (gdk_screen_get_setting (wayland_display->screen, "gtk-cursor-theme-size", &v))
size = g_value_get_int (&v);
size = 32;
g_value_unset (&v);
g_value_init (&v, G_TYPE_STRING);
if (gdk_setting_get ("gtk-cursor-theme-name", &v))
if (gdk_screen_get_setting (wayland_display->screen, "gtk-cursor-theme-name", &v))
name = g_value_get_string (&v);
name = "default";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment