Update to 3.34.1

This commit is contained in:
Florian Müllner 2019-10-09 03:19:03 +02:00
parent f48abd2745
commit b117b73bfc
9 changed files with 7 additions and 442 deletions

1
.gitignore vendored
View File

@ -160,3 +160,4 @@ mutter-2.31.5.tar.bz2
/mutter-3.33.91.tar.xz
/mutter-3.33.92.tar.xz
/mutter-3.34.0.tar.xz
/mutter-3.34.1.tar.xz

View File

@ -1,109 +0,0 @@
From 0706e021f5bd82cf4c9b2c0d2916d272f3cba406 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Tue, 24 Sep 2019 16:55:25 +0200
Subject: [PATCH 1/2] keybindings: Check for a handler before using it
The `process_event()` would check for a existing keybinding handler and
abort if there is none, however the test is done after the handler had
been accessed, hence defeating the purpose of the check.
Move the check to verify there is an existing keybinding handler before
actually using it.
https://gitlab.gnome.org/GNOME/mutter/issues/823
---
src/core/keybindings.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index a5a60e8cd..b9377bfff 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1955,6 +1955,9 @@ process_event (MetaDisplay *display,
(!window && binding->flags & META_KEY_BINDING_PER_WINDOW))
goto not_found;
+ if (binding->handler == NULL)
+ meta_bug ("Binding %s has no handler\n", binding->name);
+
if (display->focus_window &&
!(binding->handler->flags & META_KEY_BINDING_NON_MASKABLE))
{
@@ -1980,12 +1983,9 @@ process_event (MetaDisplay *display,
return TRUE;
}
- if (binding->handler == NULL)
- meta_bug ("Binding %s has no handler\n", binding->name);
- else
- meta_topic (META_DEBUG_KEYBINDINGS,
- "Running handler for %s\n",
- binding->name);
+ meta_topic (META_DEBUG_KEYBINDINGS,
+ "Running handler for %s\n",
+ binding->name);
/* Global keybindings count as a let-the-terminal-lose-focus
* due to new window mapping until the user starts
--
2.22.0
From 76f2579e442d8ad0a3b8b644daab7c72a585506b Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Tue, 24 Sep 2019 16:58:32 +0200
Subject: [PATCH 2/2] keybinding: Check for handler functions as well
With the addition of the locate-pointer special keybinding (defaults to
the [Control] key), we have now two separate special modifier keys which
can be triggered separately, one for the locate-pointer action and
another one for overlay.
When processing those special modifier keys, mutter must ensure that the
key was pressed alone, being a modifier, the key could otherwise be part
of another key combo.
As result, if both special modifiers keys are pressed simultaneously,
mutter will try to trigger the function for the second key being
pressed, and since those special modifier keys have no default handler
function set, that will crash mutter.
Check if the handler has a function associated and treat the keybinding
as not found if no handler function is set, as with the special modifier
keys.
https://gitlab.gnome.org/GNOME/mutter/issues/823
---
src/core/keybindings.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index b9377bfff..b86272541 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -1933,6 +1933,12 @@ invoke_handler (MetaDisplay *display,
NULL);
}
+static gboolean
+meta_key_binding_has_handler_func (MetaKeyBinding *binding)
+{
+ return (!!binding->handler->func || !!binding->handler->default_func);
+}
+
static gboolean
process_event (MetaDisplay *display,
MetaWindow *window,
@@ -1958,6 +1964,9 @@ process_event (MetaDisplay *display,
if (binding->handler == NULL)
meta_bug ("Binding %s has no handler\n", binding->name);
+ if (!meta_key_binding_has_handler_func (binding))
+ goto not_found;
+
if (display->focus_window &&
!(binding->handler->flags & META_KEY_BINDING_NON_MASKABLE))
{
--
2.22.0

View File

@ -1,73 +0,0 @@
From dbe9daeb763bffdf2ba4a5fa7c2a3ac8587c0d37 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Fri, 27 Sep 2019 10:15:48 +0200
Subject: [PATCH] main: Make process PR_SET_DUMPABLE
Otherwise we won't get core dumps if the launching binary has
capabilities set.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/811
---
config.h.meson | 3 +++
meson.build | 4 ++++
src/core/main.c | 8 ++++++++
3 files changed, 15 insertions(+)
diff --git a/config.h.meson b/config.h.meson
index 77045319c..0bab71848 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -61,6 +61,9 @@
/* XKB base prefix */
#mesondefine XKB_BASE
+/* Whether <sys/prctl.h> exists and it defines prctl() */
+#mesondefine HAVE_SYS_PRCTL
+
/* Either <sys/random.h> or <linux/random.h> */
#mesondefine HAVE_SYS_RANDOM
#mesondefine HAVE_LINUX_RANDOM
diff --git a/meson.build b/meson.build
index ae0bbfcc2..55ab3eb14 100644
--- a/meson.build
+++ b/meson.build
@@ -366,6 +366,10 @@ cdata.set('HAVE_PROFILER', have_profiler)
xkb_base = xkeyboard_config_dep.get_pkgconfig_variable('xkb_base')
cdata.set_quoted('XKB_BASE', xkb_base)
+if cc.has_header_symbol('sys/prctl.h', 'prctl')
+ cdata.set('HAVE_SYS_PRCTL', 1)
+endif
+
if have_wayland
xwayland_path = get_option('xwayland_path')
if xwayland_path == ''
diff --git a/src/core/main.c b/src/core/main.c
index 2724cf076..7f4f666d2 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -70,6 +70,10 @@
#include <systemd/sd-login.h>
#endif /* HAVE_WAYLAND && HAVE_NATIVE_BACKEND */
+#ifdef HAVE_SYS_PRCTL
+#include <sys/prctl.h>
+#endif
+
#include "backends/meta-backend-private.h"
#include "backends/x11/cm/meta-backend-x11-cm.h"
#include "backends/x11/meta-backend-x11.h"
@@ -532,6 +536,10 @@ meta_init (void)
MetaCompositorType compositor_type;
GType backend_gtype;
+#ifdef HAVE_SYS_PRCTL
+ prctl (PR_SET_DUMPABLE, 1);
+#endif
+
sigemptyset (&empty_mask);
act.sa_handler = SIG_IGN;
act.sa_mask = empty_mask;
--
2.22.0

View File

@ -1,83 +0,0 @@
From 850ef518795dcc20d3b9a4f661f70ff8d0ddacb2 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Wed, 11 Sep 2019 22:26:49 +0200
Subject: [PATCH] core: Split x11-display initialization in 2 signals
We have a "setup" phase, used internally to initialize early the x11
side of things like the stack tracker, and an "opened" phase where
other upper parts may hook up to. This latter phase is delayed during
initialization so the upper parts have a change to connect to on
plugin creation.
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/771
---
src/core/display.c | 13 ++++++++++++-
src/core/stack-tracker.c | 2 +-
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/core/display.c b/src/core/display.c
index e803f5557..2ddcbbc1f 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -126,6 +126,7 @@ G_DEFINE_TYPE(MetaDisplay, meta_display, G_TYPE_OBJECT);
enum
{
CURSOR_UPDATED,
+ X11_DISPLAY_SETUP,
X11_DISPLAY_OPENED,
X11_DISPLAY_CLOSING,
OVERLAY_KEY,
@@ -232,6 +233,14 @@ meta_display_class_init (MetaDisplayClass *klass)
NULL, NULL, NULL,
G_TYPE_NONE, 0);
+ display_signals[X11_DISPLAY_SETUP] =
+ g_signal_new ("x11-display-setup",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
+
display_signals[X11_DISPLAY_OPENED] =
g_signal_new ("x11-display-opened",
G_TYPE_FROM_CLASS (klass),
@@ -657,12 +666,13 @@ meta_display_init_x11 (MetaDisplay *display,
return FALSE;
display->x11_display = x11_display;
- g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
+ g_signal_emit (display, display_signals[X11_DISPLAY_SETUP], 0);
meta_x11_display_create_guard_window (x11_display);
if (!display->display_opening)
{
+ g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
meta_display_manage_all_xwindows (display);
meta_compositor_redirect_x11_windows (display->compositor);
}
@@ -803,6 +813,7 @@ meta_display_open (void)
if (display->x11_display)
{
+ g_signal_emit (display, display_signals[X11_DISPLAY_OPENED], 0);
meta_x11_display_restore_active_workspace (display->x11_display);
meta_x11_display_create_guard_window (display->x11_display);
}
diff --git a/src/core/stack-tracker.c b/src/core/stack-tracker.c
index 5a2956c00..a37760ec2 100644
--- a/src/core/stack-tracker.c
+++ b/src/core/stack-tracker.c
@@ -556,7 +556,7 @@ meta_stack_tracker_new (MetaDisplay *display)
tracker->unverified_predictions = g_queue_new ();
g_signal_connect (display,
- "x11-display-opened",
+ "x11-display-setup",
G_CALLBACK (query_xserver_stack),
tracker);
g_signal_connect (display,
--
2.22.0

View File

@ -1,67 +0,0 @@
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Fri, 20 Sep 2019 16:21:00 +0200
Subject: clutter/actor: Cancel delayed timelines on removal
Delayed clutter timelines might be removed while they are still in the
process of being executed, but if they are not playing yet their delay
timeout won't be stopped, causing them to be executed anyway, leading to a
potential crash.
In fact if something else keeps a reference on the timelines (i.e. gjs), the
dispose vfunc delay cancellation won't take effect, causing the timelines to
be started and added to the master clock.
To avoid this, expose clutter_timeline_cancel_delay() function and call it
if a timeline is not playing but has a delay set.
Fixes https://gitlab.gnome.org/GNOME/mutter/issues/815
https://gitlab.gnome.org/GNOME/mutter/merge_requests/805
Origin: upstream, commit:c9c53cb55fd6e782c50f36da1e2adbf28111a660
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/eoan/+source/mutter/+bug/1841794
Bug: https://gitlab.gnome.org/GNOME/mutter/issues/815
---
clutter/clutter/clutter-actor.c | 2 ++
clutter/clutter/clutter-private.h | 2 ++
clutter/clutter/clutter-timeline.c | 2 +-
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 68c648f..b3e9946 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -19498,6 +19498,8 @@ transition_closure_free (gpointer data)
if (clutter_timeline_is_playing (timeline))
clutter_timeline_stop (timeline);
+ else if (clutter_timeline_get_delay (timeline) > 0)
+ clutter_timeline_cancel_delay (timeline);
/* remove the reference added in add_transition_internal() */
g_object_unref (clos->transition);
diff --git a/clutter/clutter/clutter-private.h b/clutter/clutter/clutter-private.h
index a34cae4..d1da84c 100644
--- a/clutter/clutter/clutter-private.h
+++ b/clutter/clutter/clutter-private.h
@@ -315,6 +315,8 @@ gboolean _clutter_run_progress_function (GType gtype,
gdouble progress,
GValue *retval);
+void clutter_timeline_cancel_delay (ClutterTimeline *timeline);
+
G_END_DECLS
#endif /* __CLUTTER_PRIVATE_H__ */
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index bb4f77f..88b76be 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -424,7 +424,7 @@ clutter_timeline_set_custom_property (ClutterScriptable *scriptable,
g_object_set_property (G_OBJECT (scriptable), name, value);
}
-static void
+void
clutter_timeline_cancel_delay (ClutterTimeline *timeline)
{
g_clear_handle_id (&timeline->priv->delay_id, g_source_remove);

View File

@ -1,41 +0,0 @@
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Fri, 20 Sep 2019 16:28:22 +0200
Subject: clutter/timeline: Don't emit ::paused signal on delayed timelines
If a timeline is delayed and we request to stop or pause it, we are emitting
the "::paused" signal on it, however this has never been started, and so
nothing has really be paused.
So, just try to cancel the delay on pause and return if not playing.
No code in mutter or gnome-shell is affected by this, so it is safe to
change.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/805
Origin: upstream, commit:1e637bd7e1b2a4316d1cf6da80966d43819a10df
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/eoan/+source/mutter/+bug/1841794
Bug: https://gitlab.gnome.org/GNOME/mutter/issues/815
---
clutter/clutter/clutter-timeline.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index df7db16..bb4f77f 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -1214,11 +1214,11 @@ clutter_timeline_pause (ClutterTimeline *timeline)
priv = timeline->priv;
- if (priv->delay_id == 0 && !priv->is_playing)
- return;
-
clutter_timeline_cancel_delay (timeline);
+ if (!priv->is_playing)
+ return;
+
priv->msecs_delta = 0;
set_is_playing (timeline, FALSE);

View File

@ -1,58 +0,0 @@
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Fri, 20 Sep 2019 16:13:03 +0200
Subject: clutter/timeline: Use a function to cancel the delay timeout
Avoid repeating the same code for canceling the delay timeout, using a
function for later uses.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/805
Origin: upstream, commit:63a0b702c94af013b94ad3f32a8c5ba86bf6dfba
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/eoan/+source/mutter/+bug/1841794
Bug: https://gitlab.gnome.org/GNOME/mutter/issues/815
---
clutter/clutter/clutter-timeline.c | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/clutter/clutter/clutter-timeline.c b/clutter/clutter/clutter-timeline.c
index 0c026eb..df7db16 100644
--- a/clutter/clutter/clutter-timeline.c
+++ b/clutter/clutter/clutter-timeline.c
@@ -424,6 +424,11 @@ clutter_timeline_set_custom_property (ClutterScriptable *scriptable,
g_object_set_property (G_OBJECT (scriptable), name, value);
}
+static void
+clutter_timeline_cancel_delay (ClutterTimeline *timeline)
+{
+ g_clear_handle_id (&timeline->priv->delay_id, g_source_remove);
+}
static void
clutter_scriptable_iface_init (ClutterScriptableIface *iface)
@@ -550,11 +555,7 @@ clutter_timeline_dispose (GObject *object)
priv = self->priv;
- if (priv->delay_id)
- {
- g_source_remove (priv->delay_id);
- priv->delay_id = 0;
- }
+ clutter_timeline_cancel_delay (self);
if (priv->progress_notify != NULL)
{
@@ -1216,11 +1217,7 @@ clutter_timeline_pause (ClutterTimeline *timeline)
if (priv->delay_id == 0 && !priv->is_playing)
return;
- if (priv->delay_id)
- {
- g_source_remove (priv->delay_id);
- priv->delay_id = 0;
- }
+ clutter_timeline_cancel_delay (timeline);
priv->msecs_delta = 0;
set_is_playing (timeline, FALSE);

View File

@ -7,8 +7,8 @@
%global mutter_api_version 5
Name: mutter
Version: 3.34.0
Release: 5%{?dist}
Version: 3.34.1
Release: 1%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -18,14 +18,6 @@ Source0: http://download.gnome.org/sources/%{name}/3.34/%{name}-%{version}
# Work-around for OpenJDK's compliance test
Patch0: 0001-window-actor-Special-case-shaped-Java-windows.patch
# Fix xsettings/ibus-x11 initialization
# https://gitlab.gnome.org/GNOME/mutter/merge_requests/792
Patch1: 792.patch
Patch2: clutter-timeline-Use-a-function-to-cancel-the-delay-timeo.patch
Patch3: clutter-timeline-Don-t-emit-paused-signal-on-delayed-time.patch
Patch4: clutter-actor-Cancel-delayed-timelines-on-removal.patch
Patch5: 0005-keybinding-handle-no-handler-functions.patch
Patch6: 0006-add-PR_SET_DUMPABLE-to-allow-coredumps.patch
BuildRequires: chrpath
@ -171,6 +163,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Wed Oct 09 2019 Florian Müllner <fmuellner@redhat.com> - 3.34.1-1
- Update to 3.34.1
* Sat Sep 28 2019 Kenneth Topp <toppk@bllue.org> - 3.34.0-5
- Backport fix for dual special modifier keys bug (#1754867)
- Backport fix that enables core dumps (#1748145)

View File

@ -1 +1 @@
SHA512 (mutter-3.34.0.tar.xz) = 0f75712fe0c252755f69e7649fa1eb64c149a840e945514a45e27f0f7d5996a6ec5a9117c0e29beb04f46cbc4512844953dc68329e2f8e800100734f5c02ed88
SHA512 (mutter-3.34.1.tar.xz) = f95cc88f3874d91d54f0655f09f68be26e50c9740f278854cf2a019251dc0ddbfeb02e8b97c051cb98c9c6ab200f6e453f25279f3c86dfbfc172f8d8f0e37716