gtk: Avoid using gdk_screen_get_setting

We can get the setting from the display instead.
This commit is contained in:
Matthias Clasen 2017-10-30 16:50:41 -04:00
parent f9cc7ca140
commit e821c2fc2f
2 changed files with 5 additions and 7 deletions

View File

@ -284,7 +284,7 @@ gtk_application_impl_dbus_startup (GtkApplicationImpl *impl,
GValue value = G_VALUE_INIT;
g_value_init (&value, G_TYPE_STRING);
gdk_screen_get_setting (gdk_screen_get_default (), "gtk-session-bus-id", &value);
gdk_display_get_setting (gdk_display_get_default (), "gtk-session-bus-id", &value);
id = g_value_get_string (&value);
if (id && id[0])

View File

@ -476,7 +476,6 @@ display_opened_cb (GdkDisplayManager *display_manager,
{
GValue value = G_VALUE_INIT;
GSList *slist;
GdkScreen *screen;
GtkSettings *settings;
for (slist = gtk_modules; slist; slist = slist->next)
@ -489,13 +488,12 @@ display_opened_cb (GdkDisplayManager *display_manager,
(* info->display_init_func) (display);
}
}
g_value_init (&value, G_TYPE_STRING);
screen = gdk_display_get_default_screen (display);
if (gdk_screen_get_setting (screen, "gtk-modules", &value))
g_value_init (&value, G_TYPE_STRING);
if (gdk_display_get_setting (display, "gtk-modules", &value))
{
settings = gtk_settings_get_for_screen (screen);
settings = gtk_settings_get_for_display (display);
_gtk_modules_settings_changed (settings, g_value_get_string (&value));
g_value_unset (&value);
}