[mutter] settings: Improve logging of enabled experimental features
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] settings: Improve logging of enabled experimental features
- Date: Mon, 17 Feb 2020 17:38:04 +0000 (UTC)
commit 0e0afa240e6483924f450d22cb395fe0222ffa0c
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Feb 17 17:44:54 2020 +0100
settings: Improve logging of enabled experimental features
We didn't log what we enabled, just g_info():ed what failed to be
enabled. Change this to g_warning() what failed to be enabled, and
g_message() on what was enabled, so that both will be visible in the
logs.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/1061
src/backends/meta-settings.c | 29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)
---
diff --git a/src/backends/meta-settings.c b/src/backends/meta-settings.c
index 66f826f51..1cc000e61 100644
--- a/src/backends/meta-settings.c
+++ b/src/backends/meta-settings.c
@@ -248,7 +248,7 @@ experimental_features_handler (GVariant *features_variant,
{
MetaSettings *settings = data;
GVariantIter features_iter;
- char *feature;
+ char *feature_str;
MetaExperimentalFeature features = META_EXPERIMENTAL_FEATURE_NONE;
if (settings->experimental_features_overridden)
@@ -258,18 +258,25 @@ experimental_features_handler (GVariant *features_variant,
}
g_variant_iter_init (&features_iter, features_variant);
- while (g_variant_iter_loop (&features_iter, "s", &feature))
+ while (g_variant_iter_loop (&features_iter, "s", &feature_str))
{
- if (g_str_equal (feature, "scale-monitor-framebuffer"))
- features |= META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
- else if (g_str_equal (feature, "kms-modifiers"))
- features |= META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
- else if (g_str_equal (feature, "rt-scheduler"))
- features |= META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
- else if (g_str_equal (feature, "autostart-xwayland"))
- features |= META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND;
+ MetaExperimentalFeature feature = META_EXPERIMENTAL_FEATURE_NONE;
+
+ if (g_str_equal (feature_str, "scale-monitor-framebuffer"))
+ feature = META_EXPERIMENTAL_FEATURE_SCALE_MONITOR_FRAMEBUFFER;
+ else if (g_str_equal (feature_str, "kms-modifiers"))
+ feature = META_EXPERIMENTAL_FEATURE_KMS_MODIFIERS;
+ else if (g_str_equal (feature_str, "rt-scheduler"))
+ feature = META_EXPERIMENTAL_FEATURE_RT_SCHEDULER;
+ else if (g_str_equal (feature_str, "autostart-xwayland"))
+ feature = META_EXPERIMENTAL_FEATURE_AUTOSTART_XWAYLAND;
+
+ if (feature)
+ g_message ("Enabling experimental feature '%s'", feature_str);
else
- g_info ("Unknown experimental feature '%s'\n", feature);
+ g_warning ("Unknown experimental feature '%s'", feature_str);
+
+ features |= feature;
}
if (features != settings->experimental_features)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]