From 1e39f999e34e504284d2ac99794c4472707e3c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 2 Nov 2018 16:04:56 +0100 Subject: [PATCH] wayland: Remove GNOME Classic-specific workaround As GSettings now supports session-specific defaults, GNOME Classic no longer uses a separate schema and the decoration layout is always determined by the regular schema. This essentially reverts commit add67b516cb6 (although the code was moved since then). https://gitlab.gnome.org/GNOME/gtk/merge_requests/400 --- gdk/wayland/gdkdisplay-wayland.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c index 7bcf18ca30..0e49ce2773 100644 --- a/gdk/wayland/gdkdisplay-wayland.c +++ b/gdk/wayland/gdkdisplay-wayland.c @@ -1524,9 +1524,6 @@ update_xft_settings (GdkDisplay *display) } } -#define WM_SETTINGS_SCHEMA "org.gnome.desktop.wm.preferences" -#define CLASSIC_WM_SETTINGS_SCHEMA "org.gnome.shell.extensions.classic-overrides" - typedef struct _TranslationEntry TranslationEntry; struct _TranslationEntry { gboolean valid; @@ -1560,8 +1557,7 @@ static TranslationEntry translations[] = { { FALSE, "org.gnome.desktop.sound", "input-feedback-sounds", "gtk-enable-input-feedback-sounds", G_TYPE_BOOLEAN, { . b = FALSE } }, { FALSE, "org.gnome.desktop.privacy", "recent-files-max-age", "gtk-recent-files-max-age", G_TYPE_INT, { .i = 30 } }, { FALSE, "org.gnome.desktop.privacy", "remember-recent-files", "gtk-recent-files-enabled", G_TYPE_BOOLEAN, { .b = TRUE } }, - { FALSE, WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } }, - { FALSE, CLASSIC_WM_SETTINGS_SCHEMA, "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } }, + { FALSE, "org.gnome.desktop.wm.preferences", "button-layout", "gtk-decoration-layout", G_TYPE_STRING, { .s = "menu:close" } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "antialiasing", "gtk-xft-antialias", G_TYPE_NONE, { .i = 0 } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hinting", G_TYPE_NONE, { .i = 0 } }, { FALSE, "org.gnome.settings-daemon.plugins.xsettings", "hinting", "gtk-xft-hintstyle", G_TYPE_NONE, { .i = 0 } }, @@ -1760,19 +1756,9 @@ set_decoration_layout_from_entry (GdkDisplay *display, GValue *value) { GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display); - GSettings *settings = NULL; - const char *session; + GSettings *settings; - /* Hack: until we get session-dependent defaults in GSettings, - * swap out the usual schema for the "classic" one when - * running in classic mode - */ - session = g_getenv ("XDG_CURRENT_DESKTOP"); - if (session && strstr (session, "GNOME-Classic")) - settings = (GSettings *)g_hash_table_lookup (display_wayland->settings, CLASSIC_WM_SETTINGS_SCHEMA); - - if (settings == NULL) - settings = (GSettings *)g_hash_table_lookup (display_wayland->settings, WM_SETTINGS_SCHEMA); + settings = (GSettings *)g_hash_table_lookup (display_wayland->settings, entry->schema); if (settings) {