From 61bfcbe620bb0551ca911ff4c0082aa0d7f48c88 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 06 2019 10:56:12 +0000 Subject: import mutter-3.28.3-10.el7 --- diff --git a/SOURCES/0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch b/SOURCES/0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch index 2c6eae8..e448785 100644 --- a/SOURCES/0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch +++ b/SOURCES/0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch @@ -1,4 +1,4 @@ -From 8566bac05088708635e505709be656755f2849a0 Mon Sep 17 00:00:00 2001 +From 7ce6f10f6966ec6e66549a6878ae333d0fe1e84c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 3 Oct 2018 10:50:07 +0200 Subject: [PATCH 1/2] gpu/xrandr: Move dpms state and screen size updating into @@ -10,7 +10,7 @@ To be used by no-Xrandr fallback path. 1 file changed, 46 insertions(+), 24 deletions(-) diff --git a/src/backends/x11/meta-gpu-xrandr.c b/src/backends/x11/meta-gpu-xrandr.c -index add80c0d2..a4e187a49 100644 +index add80c0d2d..a4e187a49a 100644 --- a/src/backends/x11/meta-gpu-xrandr.c +++ b/src/backends/x11/meta-gpu-xrandr.c @@ -91,31 +91,15 @@ meta_gpu_xrandr_poll_hardware (MetaGpu *gpu) @@ -110,5 +110,5 @@ index add80c0d2..a4e187a49 100644 if (gpu_xrandr->need_hardware_poll) { -- -2.21.0 +2.17.1 diff --git a/SOURCES/0001-idle-monitor-Use-G_SOURCE_CONTINUE-instead-of-TRUE.patch b/SOURCES/0001-idle-monitor-Use-G_SOURCE_CONTINUE-instead-of-TRUE.patch new file mode 100644 index 0000000..ac3c785 --- /dev/null +++ b/SOURCES/0001-idle-monitor-Use-G_SOURCE_CONTINUE-instead-of-TRUE.patch @@ -0,0 +1,28 @@ +From 0ac0bc55cf69579834b28d99729cefd1157624c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Tue, 16 Apr 2019 18:06:54 +0200 +Subject: [PATCH 1/2] idle-monitor: Use G_SOURCE_CONTINUE instead of TRUE + +Returning TRUE is confusing, as it doesn't carry any relevant meaning. +Use G_SOURCE_CONTINUE to make it clearer that the source is here to +stay. +--- + src/backends/meta-idle-monitor.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/backends/meta-idle-monitor.c b/src/backends/meta-idle-monitor.c +index 46cf8cd76..2b634f59a 100644 +--- a/src/backends/meta-idle-monitor.c ++++ b/src/backends/meta-idle-monitor.c +@@ -315,7 +315,7 @@ idle_monitor_dispatch_timeout (GSource *source, + _meta_idle_monitor_watch_fire (watch); + g_source_set_ready_time (watch->timeout_source, -1); + +- return TRUE; ++ return G_SOURCE_CONTINUE; + } + + static GSourceFuncs idle_monitor_source_funcs = { +-- +2.20.1 + diff --git a/SOURCES/0001-monitor-config-store-Read-system-wide-config-files.patch b/SOURCES/0001-monitor-config-store-Read-system-wide-config-files.patch new file mode 100644 index 0000000..4fea4d0 --- /dev/null +++ b/SOURCES/0001-monitor-config-store-Read-system-wide-config-files.patch @@ -0,0 +1,186 @@ +From f7de692a87e4bf46bc005567fe0475c1208f0969 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +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. + +https://gitlab.gnome.org/GNOME/mutter/merge_requests/253 +--- + src/backends/meta-monitor-config-manager.h | 1 + + src/backends/meta-monitor-config-store.c | 72 +++++++++++++++++++--- + 2 files changed, 65 insertions(+), 8 deletions(-) + +diff --git a/src/backends/meta-monitor-config-manager.h b/src/backends/meta-monitor-config-manager.h +index 29ef8f8ce..16dff6d6a 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 ed0ce34f0..770bef734 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, +@@ -1274,6 +1280,9 @@ generate_config_xml (MetaMonitorConfigStore *config_store) + { + GList *l; + ++ if (config->flags & META_MONITORS_CONFIG_FLAG_SYSTEM_CONFIG) ++ continue; ++ + g_string_append (buffer, " \n"); + + if (config->flags & META_MONITORS_CONFIG_FLAG_MIGRATED) +@@ -1425,6 +1434,12 @@ maybe_save_configs (MetaMonitorConfigStore *config_store) + meta_monitor_config_store_save (config_store); + } + ++static gboolean ++is_system_config (MetaMonitorsConfig *config) ++{ ++ return !!(config->flags & META_MONITORS_CONFIG_FLAG_SYSTEM_CONFIG); ++} ++ + void + meta_monitor_config_store_add (MetaMonitorConfigStore *config_store, + MetaMonitorsConfig *config) +@@ -1432,7 +1447,8 @@ meta_monitor_config_store_add (MetaMonitorConfigStore *config_store, + g_hash_table_replace (config_store->configs, + config->key, g_object_ref (config)); + +- maybe_save_configs (config_store); ++ if (!is_system_config (config)) ++ maybe_save_configs (config_store); + } + + void +@@ -1441,7 +1457,8 @@ meta_monitor_config_store_remove (MetaMonitorConfigStore *config_store, + { + g_hash_table_remove (config_store->configs, config->key); + +- maybe_save_configs (config_store); ++ if (!is_system_config (config)) ++ maybe_save_configs (config_store); + } + + gboolean +@@ -1458,7 +1475,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 +1505,42 @@ 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++) ++ { ++ g_autofree char *system_file_path = NULL; ++ ++ system_file_path = g_build_filename (*system_dirs, "monitors.xml", NULL); ++ if (g_file_test (system_file_path, G_FILE_TEST_EXISTS)) ++ { ++ g_autoptr (GFile) system_file = NULL; ++ ++ 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); ++ } ++ } ++ } ++ + user_file_path = g_build_filename (g_get_user_config_dir (), + "monitors.xml", + NULL); +@@ -1495,7 +1548,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.20.1 + diff --git a/SOURCES/0002-idle-monitor-Postpone-dispatching-of-idle-timeout-if.patch b/SOURCES/0002-idle-monitor-Postpone-dispatching-of-idle-timeout-if.patch new file mode 100644 index 0000000..54879c6 --- /dev/null +++ b/SOURCES/0002-idle-monitor-Postpone-dispatching-of-idle-timeout-if.patch @@ -0,0 +1,41 @@ +From 22879378393c21a1a1e5307dc457233bd40ef877 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jonas=20=C3=85dahl?= +Date: Tue, 16 Apr 2019 18:07:31 +0200 +Subject: [PATCH 2/2] idle-monitor: Postpone dispatching of idle timeout if not + ready + +If we update the ready time while the source is already in the +to-dispatch list, changing the ready time doesn't have any effect, and +the source will still be dispatched. This could cause incorrect idle +watch firing causing the power management plugin in +gnome-settings-daemon to sometimes turn off monitors due to it believing +the user had been idle for some time, while in fact, they just logged +back in. + +Fix this by not actually dispatching the idle timeout if the ready time +is in the future when actually dispatching. +--- + src/backends/meta-idle-monitor.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/backends/meta-idle-monitor.c b/src/backends/meta-idle-monitor.c +index 2b634f59a..2c06ee73c 100644 +--- a/src/backends/meta-idle-monitor.c ++++ b/src/backends/meta-idle-monitor.c +@@ -311,6 +311,13 @@ idle_monitor_dispatch_timeout (GSource *source, + gpointer user_data) + { + MetaIdleMonitorWatch *watch = (MetaIdleMonitorWatch *) user_data; ++ int64_t now; ++ int64_t ready_time; ++ ++ now = g_source_get_time (source); ++ ready_time = g_source_get_ready_time (source); ++ if (ready_time > now) ++ return G_SOURCE_CONTINUE; + + _meta_idle_monitor_watch_fire (watch); + g_source_set_ready_time (watch->timeout_source, -1); +-- +2.20.1 + diff --git a/SOURCES/0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch b/SOURCES/0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch index 7aeeb68..a676cf6 100644 --- a/SOURCES/0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch +++ b/SOURCES/0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch @@ -1,4 +1,4 @@ -From f5b0e165c71d5114ba5221eea6ac9ec68b8ced94 Mon Sep 17 00:00:00 2001 +From 8950fc632bcf4c3eca2be1c347acaa16b4b8d0c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Wed, 3 Oct 2018 10:50:47 +0200 Subject: [PATCH 2/2] monitor-manager/xrandr: Create dummy screen sized monitor @@ -16,7 +16,7 @@ monitor with a single output, crtc and mode. 3 files changed, 82 insertions(+) diff --git a/src/backends/x11/meta-gpu-xrandr.c b/src/backends/x11/meta-gpu-xrandr.c -index a4e187a49..9397c1f64 100644 +index a4e187a49a..9397c1f64d 100644 --- a/src/backends/x11/meta-gpu-xrandr.c +++ b/src/backends/x11/meta-gpu-xrandr.c @@ -147,6 +147,63 @@ update_screen_size (MetaMonitorManagerXrandr *monitor_manager_xrandr) @@ -94,7 +94,7 @@ index a4e187a49..9397c1f64 100644 XRRFreeScreenResources (gpu_xrandr->resources); gpu_xrandr->resources = NULL; diff --git a/src/backends/x11/meta-monitor-manager-xrandr.c b/src/backends/x11/meta-monitor-manager-xrandr.c -index d0da2c539..26b057a55 100644 +index d0da2c539e..26b057a559 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.c +++ b/src/backends/x11/meta-monitor-manager-xrandr.c @@ -64,6 +64,7 @@ struct _MetaMonitorManagerXrandr @@ -154,7 +154,7 @@ index d0da2c539..26b057a55 100644 and we don't want to step on its toes */ XRRSelectInput (manager_xrandr->xdisplay, diff --git a/src/backends/x11/meta-monitor-manager-xrandr.h b/src/backends/x11/meta-monitor-manager-xrandr.h -index f09cbfd83..343c8131e 100644 +index f09cbfd83a..343c8131ee 100644 --- a/src/backends/x11/meta-monitor-manager-xrandr.h +++ b/src/backends/x11/meta-monitor-manager-xrandr.h @@ -33,6 +33,8 @@ G_DECLARE_FINAL_TYPE (MetaMonitorManagerXrandr, meta_monitor_manager_xrandr, @@ -167,5 +167,5 @@ index f09cbfd83..343c8131e 100644 gboolean meta_monitor_manager_xrandr_handle_xevent (MetaMonitorManagerXrandr *manager, -- -2.21.0 +2.17.1 diff --git a/SPECS/mutter.spec b/SPECS/mutter.spec index 1ece681..ab0e8b9 100644 --- a/SPECS/mutter.spec +++ b/SPECS/mutter.spec @@ -10,7 +10,7 @@ Name: mutter Version: 3.28.3 -Release: 8%{?dist} +Release: 10%{?dist} Summary: Window and compositing manager based on Clutter License: GPLv2+ @@ -64,12 +64,19 @@ Patch201: hw-cursor-on-demand-gnome-3-28.patch # Check hw support for calculated view transform Patch202: 0001-renderer-native-Check-calculated-transform-when-crea.patch -# Don't ignore 'MetaModes' (#1690760) -Patch250: inherit-xrandr-metamodes.patch +# System wide monitor configuration (#1583825) +Patch250: 0001-monitor-config-store-Read-system-wide-config-files.patch -# Handle lack of XRANDR (#1714959) -Patch260: 0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch -Patch261: 0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch +# Don't ignore 'MetaModes' (#1581806) +Patch260: inherit-xrandr-metamodes.patch + +# Handle lack of RANDR (#1579257) +Patch261: 0001-gpu-xrandr-Move-dpms-state-and-screen-size-updating-.patch +Patch262: 0002-monitor-manager-xrandr-Create-dummy-screen-sized-mon.patch + +# Queue stage redraw on reactivate (#1636460) +Patch270: 0001-idle-monitor-Use-G_SOURCE_CONTINUE-instead-of-TRUE.patch +Patch271: 0002-idle-monitor-Postpone-dispatching-of-idle-timeout-if.patch BuildRequires: chrpath BuildRequires: pango-devel @@ -226,14 +233,22 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %{_libdir}/pkgconfig/* %changelog -* Wed Jun 12 2019 Jonas Ådahl - 3.28.3-8 -- Handle lack of XRANDR (#1714959) +* Wed Apr 17 2019 Jonas Ådahl - 3.28.3-10 +- Fix idle monitor race condition + Resolves: #1636460 + +* Thu Mar 28 2019 Jonas Ådahl - 3.28.3-9 +- Handle lack of RANDR + Resolves: #1579257 + +* Mon Mar 18 2019 Jonas Ådahl - 3.28.3-8 +- Don't ignore current mode when deriving current config (#1581806) -* Mon Mar 18 2019 Jonas Ådahl - 3.28.3-7 -- Don't ignore current mode when deriving current config (#1690760) +* Tue Mar 12 2019 Jonas Ådahl - 3.28.3-7 +- Backport read system wide monitor configuration patch (#1583825) -* Wed Jan 16 2019 Florian Müllner - 3.26.2-18 -- Prevent titlebars going off-screen (rhbz#1679913) +* Wed Jan 16 2019 Florian Müllner - 3.28.3-6 +- Prevent titlebars going off-screen (rhbz#1664407) * Wed Oct 10 2018 Carlos Garnacho - 3.28.3-5 - Do not latch modifiers on modifier keys