[gtk+] Prevent criticals when initializing a Wayland display
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Prevent criticals when initializing a Wayland display
- Date: Sat, 4 May 2013 20:12:33 +0000 (UTC)
commit e61df371c9e6ed19e138391d258521486a27f735
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 4 16:11:00 2013 -0400
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.
gdk/wayland/gdkdisplay-wayland.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 3a80d0a..ee51ab5 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -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);
else
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);
else
name = "default";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]