Hello community, here is the log from the commit of package mutter for openSUSE:Factory checked in at 2017-10-21 20:16:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mutter (Old) and /work/SRC/openSUSE:Factory/.mutter.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mutter" Sat Oct 21 20:16:54 2017 rev:118 rq:535494 version:3.26.1 Changes: -------- --- /work/SRC/openSUSE:Factory/mutter/mutter.changes 2017-10-20 16:12:38.504776444 +0200 +++ /work/SRC/openSUSE:Factory/.mutter.new/mutter.changes 2017-10-21 20:16:55.840613526 +0200 @@ -1,0 +2,8 @@ +Thu Oct 19 21:47:53 UTC 2017 - [email protected] + +- Add mutter-handle-no-to-no-monitor.patch: fix possible crash when + turning monitor off and on while logged in (bgo#788607). +- Add mutter-preferred-mode.patch: fix a crash on some ATI (radeon) + configurations (bgo#789153). + +------------------------------------------------------------------- New: ---- mutter-handle-no-to-no-monitor.patch mutter-preferred-mode.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mutter.spec ++++++ --- /var/tmp/diff_new_pack.tysVHD/_old 2017-10-21 20:16:57.260547034 +0200 +++ /var/tmp/diff_new_pack.tysVHD/_new 2017-10-21 20:16:57.280546098 +0200 @@ -32,6 +32,10 @@ Patch2: mutter-wayland-dma-buf-modifiers-fix.patch # PATCH-FIX-UPSTREAM mutter-x11-Protect-XChangeProperty-call.patch bgo#788666 [email protected] -- Protect XChangeProperty call with error traps Patch3: mutter-x11-Protect-XChangeProperty-call.patch +# PATCH-FIX-UPSTREAM mutter-handle-no-to-no-monitor.patch bgo#788607 [email protected] -- handle updating from no to no monitor. +Patch4: mutter-handle-no-to-no-monitor.patch +# PATCH-FIX-UPSTREAM mutter-preferred-mode.patch bgo#789153 [email protected] -- monitor/normal: prefer modes with same flags as preferred mode. +Patch5: mutter-preferred-mode.patch # SLE only patches start at 1000 # PATCH-FEATURE-SLE mutter-SLE-bell.patch FATE#316042 bnc#889218 [email protected] -- make audible bell work out of the box. @@ -144,6 +148,8 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%patch5 -p1 # SLE only patches and translations. %if !0%{?is_opensuse} ++++++ mutter-handle-no-to-no-monitor.patch ++++++ >From 8886e1bbdcb712d1e70873b2cccb7ab62e6a3eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= <[email protected]> Date: Sat, 7 Oct 2017 00:33:39 -0400 Subject: [PATCH] window: Handle updating from no to no monitor When we received two hot plug events that both resulted in headless configuration, we tried to find a new window monitor given the old. That resulted in a null pointer dereference; avoid that by only trying to find the same monitor if there was an old one. https://bugzilla.gnome.org/show_bug.cgi?id=788607 --- src/core/window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index dc60a667c..c2d9869d2 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -3793,7 +3793,7 @@ meta_window_update_for_monitors_changed (MetaWindow *window) new = find_monitor_by_winsys_id (window, window->preferred_output_winsys_id); /* Otherwise, try to find the old output on a new monitor */ - if (!new) + if (old && !new) new = find_monitor_by_winsys_id (window, old->winsys_id); /* Fall back to primary if everything else failed */ -- 2.14.2 ++++++ mutter-preferred-mode.patch ++++++ >From c0dc66e8c0dfc6ab02506343dc8418891159657c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= <[email protected]> Date: Wed, 18 Oct 2017 23:22:01 +0800 Subject: [PATCH] monitor/normal: Prefer modes with same flags as preferred mode When generating MetaMonitorMode's, prefer CRTC modes that has the same set of flags as the preferred mode. This not only is probably a better set of configurable modes, but it'll guarantee that the preferred mode is added. This fixes a crash when the preferred mode was not the first mode with the same resolution, refresh rate and set of handled modes. https://bugzilla.gnome.org/show_bug.cgi?id=789153 --- src/backends/meta-monitor.c | 41 ++++++++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 9 deletions(-) diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c index 8ca6ea859..2d06a1e36 100644 --- a/src/backends/meta-monitor.c +++ b/src/backends/meta-monitor.c @@ -394,16 +394,22 @@ generate_mode_id (MetaMonitorModeSpec *monitor_mode_spec) static gboolean meta_monitor_add_mode (MetaMonitor *monitor, - MetaMonitorMode *monitor_mode) + MetaMonitorMode *monitor_mode, + gboolean replace) { MetaMonitorPrivate *priv = meta_monitor_get_instance_private (monitor); + MetaMonitorMode *existing_mode; - if (g_hash_table_lookup (priv->mode_ids, - meta_monitor_mode_get_id (monitor_mode))) + existing_mode = g_hash_table_lookup (priv->mode_ids, + meta_monitor_mode_get_id (monitor_mode)); + if (existing_mode && !replace) return FALSE; + if (existing_mode) + priv->modes = g_list_remove (priv->modes, existing_mode); + priv->modes = g_list_append (priv->modes, monitor_mode); - g_hash_table_insert (priv->mode_ids, monitor_mode->id, monitor_mode); + g_hash_table_replace (priv->mode_ids, monitor_mode->id, monitor_mode); return TRUE; } @@ -415,13 +421,17 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal) MetaMonitorPrivate *monitor_priv = meta_monitor_get_instance_private (monitor); MetaOutput *output; + MetaCrtcModeFlag preferred_mode_flags; unsigned int i; output = meta_monitor_get_main_output (monitor); + preferred_mode_flags = output->preferred_mode->flags; + for (i = 0; i < output->n_modes; i++) { MetaCrtcMode *crtc_mode = output->modes[i]; MetaMonitorMode *mode; + gboolean replace; mode = g_new0 (MetaMonitorMode, 1); mode->spec = (MetaMonitorModeSpec) { @@ -437,13 +447,26 @@ meta_monitor_normal_generate_modes (MetaMonitorNormal *monitor_normal) .crtc_mode = crtc_mode }; + /* + * We don't distinguish between all available mode flags, just the ones + * that are configurable. We still need to pick some mode though, so + * prefer ones that has the same set of flags as the preferred mode; + * otherwise take the first one in the list. This guarantees that the + * preferred mode is always added. + */ + replace = crtc_mode->flags == preferred_mode_flags; + + if (!meta_monitor_add_mode (monitor, mode, replace)) + { + g_assert (crtc_mode != output->preferred_mode); + meta_monitor_mode_free (mode); + continue; + } + if (crtc_mode == output->preferred_mode) monitor_priv->preferred_mode = mode; if (output->crtc && crtc_mode == output->crtc->current_mode) monitor_priv->current_mode = mode; - - if (!meta_monitor_add_mode (monitor, mode)) - meta_monitor_mode_free (mode); } } @@ -825,7 +848,7 @@ generate_tiled_monitor_modes (MetaMonitorTiled *monitor_tiled) tiled_modes = g_list_remove_link (tiled_modes, l); - if (!meta_monitor_add_mode (monitor, mode)) + if (!meta_monitor_add_mode (monitor, mode, FALSE)) { meta_monitor_mode_free (mode); continue; @@ -967,7 +990,7 @@ generate_untiled_monitor_modes (MetaMonitorTiled *monitor_tiled) if (!mode) continue; - if (!meta_monitor_add_mode (monitor, mode)) + if (!meta_monitor_add_mode (monitor, mode, FALSE)) { meta_monitor_mode_free (mode); continue; -- 2.14.2
