Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1490893 Details for
Bug 1583825
[RFE] mass-deployable/homogenized display configuration
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Mutter patch for rhel 7.6
0001-monitor-config-store-Read-system-wide-config-files.patch (text/plain), 6.94 KB, created by
Jonas Ådahl
on 2018-10-05 16:56:50 UTC
(
hide
)
Description:
Mutter patch for rhel 7.6
Filename:
MIME Type:
Creator:
Jonas Ådahl
Created:
2018-10-05 16:56:50 UTC
Size:
6.94 KB
patch
obsolete
>From fb3c609077024a8fd9835c0cb18b21965a244ec7 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com> >Date: Fri, 5 Oct 2018 18:52:03 +0200 >Subject: [PATCH] monitor-config-store: Read system wide config files > >Before introducing the new config store, the old monitor configuration >system read system wide monitor configuration files. Add back that >feature. >--- > src/backends/meta-monitor-config-manager.h | 1 + > src/backends/meta-monitor-config-store.c | 89 ++++++++++++++++++++-- > 2 files changed, 82 insertions(+), 8 deletions(-) > >diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h >index 29ef8f8ce1..16dff6d6a7 100644 >--- a/src/backends/meta-monitor-config-manager.h >+++ b/src/backends/meta-monitor-config-manager.h >@@ -55,6 +55,7 @@ typedef enum _MetaMonitorsConfigFlag > { > META_MONITORS_CONFIG_FLAG_NONE = 0, > META_MONITORS_CONFIG_FLAG_MIGRATED = (1 << 0), >+ META_MONITORS_CONFIG_FLAG_SYSTEM_CONFIG = (1 << 1), > } MetaMonitorsConfigFlag; > > struct _MetaMonitorsConfig >diff --git a/src/backends/meta-monitor-config-store.c b/src/backends/meta-monitor-config-store.c >index ed0ce34f00..d70e4aa9eb 100644 >--- a/src/backends/meta-monitor-config-store.c >+++ b/src/backends/meta-monitor-config-store.c >@@ -179,6 +179,8 @@ typedef struct > MetaMonitorConfig *current_monitor_config; > MetaLogicalMonitorConfig *current_logical_monitor_config; > GList *current_disabled_monitor_specs; >+ >+ MetaMonitorsConfigFlag extra_config_flags; > } ConfigParser; > > G_DEFINE_TYPE (MetaMonitorConfigStore, meta_monitor_config_store, >@@ -766,6 +768,8 @@ handle_end_element (GMarkupParseContext *context, > if (parser->current_was_migrated) > config_flags |= META_MONITORS_CONFIG_FLAG_MIGRATED; > >+ config_flags |= parser->extra_config_flags; >+ > config = > meta_monitors_config_new_full (parser->current_logical_monitor_configs, > parser->current_disabled_monitor_specs, >@@ -1078,9 +1082,10 @@ static const GMarkupParser config_parser = { > }; > > static gboolean >-read_config_file (MetaMonitorConfigStore *config_store, >- GFile *file, >- GError **error) >+read_config_file (MetaMonitorConfigStore *config_store, >+ GFile *file, >+ MetaMonitorsConfigFlag extra_config_flags, >+ GError **error) > { > char *buffer; > gsize size; >@@ -1092,7 +1097,8 @@ read_config_file (MetaMonitorConfigStore *config_store, > > parser = (ConfigParser) { > .state = STATE_INITIAL, >- .config_store = config_store >+ .config_store = config_store, >+ .extra_config_flags = extra_config_flags, > }; > > parse_context = g_markup_parse_context_new (&config_parser, >@@ -1413,6 +1419,27 @@ meta_monitor_config_store_save (MetaMonitorConfigStore *config_store) > saved_cb, data); > } > >+static gboolean >+has_non_system_config (MetaMonitorConfigStore *config_store) >+{ >+ GString *buffer; >+ GHashTableIter iter; >+ MetaMonitorsConfig *config; >+ >+ buffer = g_string_new (""); >+ g_string_append_printf (buffer, "<monitors version=\"%d\">\n", >+ MONITORS_CONFIG_XML_FORMAT_VERSION); >+ >+ g_hash_table_iter_init (&iter, config_store->configs); >+ while (g_hash_table_iter_next (&iter, NULL, (gpointer *) &config)) >+ { >+ if (!(config->flags & META_MONITORS_CONFIG_FLAG_SYSTEM_CONFIG)) >+ return TRUE; >+ } >+ >+ return FALSE; >+} >+ > static void > maybe_save_configs (MetaMonitorConfigStore *config_store) > { >@@ -1421,8 +1448,13 @@ maybe_save_configs (MetaMonitorConfigStore *config_store) > * is done, avoid replacing the user configuration file with test data, > * except if a custom write file is set as well. > */ >- if (!config_store->custom_read_file || config_store->custom_write_file) >- meta_monitor_config_store_save (config_store); >+ if (config_store->custom_read_file && !config_store->custom_write_file) >+ return; >+ >+ if (!has_non_system_config (config_store)) >+ return; >+ >+ meta_monitor_config_store_save (config_store); > } > > void >@@ -1458,7 +1490,10 @@ meta_monitor_config_store_set_custom (MetaMonitorConfigStore *config_store, > if (write_path) > config_store->custom_write_file = g_file_new_for_path (write_path); > >- return read_config_file (config_store, config_store->custom_read_file, error); >+ return read_config_file (config_store, >+ config_store->custom_read_file, >+ META_MONITORS_CONFIG_FLAG_NONE, >+ error); > } > > int >@@ -1485,9 +1520,44 @@ static void > meta_monitor_config_store_constructed (GObject *object) > { > MetaMonitorConfigStore *config_store = META_MONITOR_CONFIG_STORE (object); >+ const char * const *system_dirs; > char *user_file_path; > GError *error = NULL; > >+ for (system_dirs = g_get_system_config_dirs (); >+ system_dirs && *system_dirs; >+ system_dirs++) >+ { >+ char *system_file_path; >+ >+ system_file_path = g_build_filename (*system_dirs, "monitors.xml", NULL); >+ if (g_file_test (system_file_path, G_FILE_TEST_EXISTS)) >+ { >+ GFile *system_file; >+ >+ system_file = g_file_new_for_path (system_file_path); >+ if (!read_config_file (config_store, >+ system_file, >+ META_MONITORS_CONFIG_FLAG_SYSTEM_CONFIG, >+ &error)) >+ { >+ if (g_error_matches (error, >+ META_MONITOR_CONFIG_STORE_ERROR, >+ META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION)) >+ g_warning ("System monitor configuration file (%s) is " >+ "incompatible; ask your administrator to migrate " >+ "the system monitor configuation.", >+ system_file_path); >+ else >+ g_warning ("Failed to read monitors config file '%s': %s", >+ system_file_path, error->message); >+ g_clear_error (&error); >+ } >+ g_object_unref (system_file); >+ } >+ g_free (system_file_path); >+ } >+ > user_file_path = g_build_filename (g_get_user_config_dir (), > "monitors.xml", > NULL); >@@ -1495,7 +1565,10 @@ meta_monitor_config_store_constructed (GObject *object) > > if (g_file_test (user_file_path, G_FILE_TEST_EXISTS)) > { >- if (!read_config_file (config_store, config_store->user_file, &error)) >+ if (!read_config_file (config_store, >+ config_store->user_file, >+ META_MONITORS_CONFIG_FLAG_NONE, >+ &error)) > { > if (error->domain == META_MONITOR_CONFIG_STORE_ERROR && > error->code == META_MONITOR_CONFIG_STORE_ERROR_NEEDS_MIGRATION) >-- >2.17.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1583825
: 1490893