summaryrefslogtreecommitdiff
path: root/capplets/appearance
diff options
context:
space:
mode:
authorlukefromdc <[email protected]>2024-06-05 00:53:26 -0400
committerLuke from DC <[email protected]>2024-06-27 18:41:52 +0000
commit4ce1a21d546c99c6af04c3384d2b199680b91d2f (patch)
tree5bb6421aaa57be8977580fd6e2850ccb30b152a6 /capplets/appearance
parent3d66d85f971d94758fdff080149da00b3efd976f (diff)
downloadmate-control-center-4ce1a21d546c99c6af04c3384d2b199680b91d2f.tar.bz2
mate-control-center-4ce1a21d546c99c6af04c3384d2b199680b91d2f.tar.xz
appearance under wayland: fix customizing themes
Since wayland compositors such as wayfire follow the GNOME interface gsettings values, we need to set them here too
Diffstat (limited to 'capplets/appearance')
-rw-r--r--capplets/appearance/appearance-style.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/capplets/appearance/appearance-style.c b/capplets/appearance/appearance-style.c
index fd00c644..3cb250f9 100644
--- a/capplets/appearance/appearance-style.c
+++ b/capplets/appearance/appearance-style.c
@@ -30,6 +30,7 @@
#include "theme-thumbnail.h"
#include "capplet-util.h"
#include "appearance-style.h"
+#include <gdk/gdkx.h>
#define GSETTINGS_SETTINGS "GSETTINGS_SETTINGS"
#define GSETTINGS_KEY "GSETTINGS_KEY"
@@ -152,6 +153,30 @@ treeview_selection_changed_callback (GtkTreeSelection *selection, guint data)
if (list_value) {
g_settings_set_string (settings, key, list_value);
+
+ /*Load the gnome interface schema if we are running under wayland and it is present*/
+ if (!(GDK_IS_X11_DISPLAY (gdk_display_get_default())))
+ {
+ GSettingsSchemaSource *source = g_settings_schema_source_get_default ();
+
+ if (source)
+ {
+ GSettingsSchema *schema = g_settings_schema_source_lookup (source, INTERFACE_GNOME_SCHEMA, TRUE);
+ {
+ if (schema)
+ {
+ GSettings *interface_gnome_settings = NULL;
+ interface_gnome_settings = g_settings_new_full (schema, NULL, NULL);
+
+ if ((strcmp (key, GTK_THEME_KEY) == 0) ||
+ (strcmp (key, ICON_THEME_KEY) == 0) ||
+ (strcmp (key, CURSOR_THEME_KEY) == 0))
+ g_settings_set_string (interface_gnome_settings, key, list_value);
+
+ }
+ }
+ }
+ }
}
}
}