Update to 3.31.4

This commit is contained in:
Florian Müllner 2018-11-19 17:17:18 +01:00
parent 66f37d73e5
commit ae5d2a6c37
8 changed files with 17 additions and 376 deletions

1
.gitignore vendored
View File

@ -146,3 +146,4 @@ mutter-2.31.5.tar.bz2
/mutter-3.30.0.tar.xz
/mutter-3.30.1.tar.xz
/mutter-3.31.2.tar.xz
/mutter-3.31.4.tar.xz

View File

@ -1,94 +0,0 @@
From 71a62bb18fe3aebc6668bd37ef6917398ef71ae1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 20 Oct 2018 15:46:37 +0200
Subject: [PATCH 1/2] constraints: Make current placement rule stack allocated
We're not going to keep it past the function scope, so no reason to put
it on the heap. We also didn't free it, so this'll fix a memory leak.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
---
src/core/constraints.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
diff --git a/src/core/constraints.c b/src/core/constraints.c
index a205ea0fd7..3652b3d8e1 100644
--- a/src/core/constraints.c
+++ b/src/core/constraints.c
@@ -787,7 +787,7 @@ constrain_custom_rule (MetaWindow *window,
MetaPlacementRule *placement_rule;
MetaRectangle intersection;
gboolean constraint_satisfied;
- MetaPlacementRule *current_rule;
+ MetaPlacementRule current_rule;
MetaWindow *parent;
MetaRectangle parent_rect;
@@ -820,25 +820,24 @@ constrain_custom_rule (MetaWindow *window,
if (check_only)
return constraint_satisfied;
- current_rule = g_new0 (MetaPlacementRule, 1);
- *current_rule = *placement_rule;
+ current_rule = *placement_rule;
if (constraint_satisfied)
goto done;
if (info->current.width != intersection.width &&
- (current_rule->constraint_adjustment &
+ (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X))
{
- try_flip_window_position (window, info, current_rule,
+ try_flip_window_position (window, info, &current_rule,
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_X,
&info->current, &intersection);
}
if (info->current.height != intersection.height &&
- (current_rule->constraint_adjustment &
+ (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y))
{
- try_flip_window_position (window, info, current_rule,
+ try_flip_window_position (window, info, &current_rule,
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_FLIP_Y,
&info->current, &intersection);
}
@@ -852,7 +851,7 @@ constrain_custom_rule (MetaWindow *window,
if (constraint_satisfied)
goto done;
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_X)
{
if (info->current.x != intersection.x)
@@ -860,7 +859,7 @@ constrain_custom_rule (MetaWindow *window,
else if (info->current.width != intersection.width)
info->current.x -= info->current.width - intersection.width;
}
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_SLIDE_Y)
{
if (info->current.y != intersection.y)
@@ -878,13 +877,13 @@ constrain_custom_rule (MetaWindow *window,
if (constraint_satisfied)
goto done;
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_X)
{
info->current.x = intersection.x;
info->current.width = intersection.width;
}
- if (current_rule->constraint_adjustment &
+ if (current_rule.constraint_adjustment &
META_PLACEMENT_CONSTRAINT_ADJUSTMENT_RESIZE_Y)
{
info->current.y = intersection.y;
--
2.19.1

View File

@ -1,34 +0,0 @@
From 5e1e1fa78af7c91a9ba209c3abe71fff4e6a25d7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Thu, 11 Oct 2018 15:16:26 +0200
Subject: [PATCH] monitor-manager: Don't use switch-config when ensuring
configuration
Switch-configs are only to be used in certain circumstances (see
meta_monitor_manager_can_switch_config()) so when ensuring
configuration and attempting to create a linear configuration, use the
linear configuration constructor function directly without going via the
switch config method, otherwise we might incorrectly fall back to the
fallback configuration (only enable primary monitor).
---
src/backends/meta-monitor-manager.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/backends/meta-monitor-manager.c b/src/backends/meta-monitor-manager.c
index baed7521dd..d9236b928b 100644
--- a/src/backends/meta-monitor-manager.c
+++ b/src/backends/meta-monitor-manager.c
@@ -561,9 +561,7 @@ meta_monitor_manager_ensure_configured (MetaMonitorManager *manager)
g_clear_object (&config);
}
- config =
- meta_monitor_config_manager_create_for_switch_config (manager->config_manager,
- META_MONITOR_SWITCH_CONFIG_ALL_LINEAR);
+ config = meta_monitor_config_manager_create_linear (manager->config_manager);
if (config)
{
if (!meta_monitor_manager_apply_monitors_config (manager,
--
2.17.1

View File

@ -1,127 +0,0 @@
From 63124e3e8a675725c729d4a99b994a83517a5c1a Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 18 Oct 2018 02:08:24 +0200
Subject: [PATCH] wayland: Defer text_input.done on an idle
IBus naturally doesn't know how to implement the text-input protocol,
and some input methods emit event streams that are incompatible with the
protocol, if not assumed to be part of an grouped series of events. As
IBus doesn't have any API to let us know about such groupings, let's
fake it by adding a specially crafted idle callback.
The idle callback has a known limitation; if there is an idle callback
with a higher priority, that either doesn't remove itself, or
reschedules itself before the next idle, we'll never get triggered.
This, however, is unlikely to actually be the bigger problem in such
situations, as it'd likely mean we'd have a 100% CPU bug.
https://gitlab.gnome.org/GNOME/gtk/issues/1365
---
src/wayland/meta-wayland-text-input.c | 60 ++++++++++++++++++++++++---
1 file changed, 54 insertions(+), 6 deletions(-)
diff --git a/src/wayland/meta-wayland-text-input.c b/src/wayland/meta-wayland-text-input.c
index 8681430217..0493760bd1 100644
--- a/src/wayland/meta-wayland-text-input.c
+++ b/src/wayland/meta-wayland-text-input.c
@@ -70,6 +70,8 @@ struct _MetaWaylandTextInput
uint32_t content_type_purpose;
uint32_t text_change_cause;
gboolean enabled;
+
+ guint done_idle_id;
};
struct _MetaWaylandTextInputFocus
@@ -114,6 +116,52 @@ increment_serial (MetaWaylandTextInput *text_input,
GUINT_TO_POINTER (serial + 1));
}
+static gboolean
+done_idle_cb (gpointer user_data)
+{
+ ClutterInputFocus *focus = user_data;
+ MetaWaylandTextInput *text_input;
+ struct wl_resource *resource;
+
+ text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
+
+ wl_resource_for_each (resource, &text_input->focus_resource_list)
+ {
+ zwp_text_input_v3_send_done (resource,
+ lookup_serial (text_input, resource));
+ }
+
+ text_input->done_idle_id = 0;
+ return G_SOURCE_REMOVE;
+}
+
+static void
+meta_wayland_text_input_focus_defer_done (ClutterInputFocus *focus)
+{
+ MetaWaylandTextInput *text_input;
+
+ text_input = META_WAYLAND_TEXT_INPUT_FOCUS (focus)->text_input;
+
+ if (text_input->done_idle_id != 0)
+ return;
+
+ /* This operates on 3 principles:
+ * - GDBus uses G_PRIORITY_DEFAULT to put messages in the thread default main
+ * context.
+ * - All relevant ClutterInputFocus methods are ultimately backed by
+ * DBus methods inside IBus.
+ * - We want to run .done after them all. The slightly lower
+ * G_PRIORITY_DEFAULT + 1 priority should ensure we at least group
+ * all messages seen so far.
+ *
+ * FIXME: .done may be delayed indefinitely if there's a high enough
+ * priority idle source in the main loop. It's unlikely that
+ * recurring idles run at this high priority though.
+ */
+ text_input->done_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT + 1,
+ done_idle_cb, focus, NULL);
+}
+
static void
meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
guint cursor,
@@ -127,9 +175,9 @@ meta_wayland_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
wl_resource_for_each (resource, &text_input->focus_resource_list)
{
zwp_text_input_v3_send_delete_surrounding_text (resource, cursor, len);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
@@ -145,9 +193,9 @@ meta_wayland_text_input_focus_commit_text (ClutterInputFocus *focus,
{
zwp_text_input_v3_send_preedit_string (resource, NULL, 0, 0);
zwp_text_input_v3_send_commit_string (resource, text);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
@@ -163,9 +211,9 @@ meta_wayland_text_input_focus_set_preedit_text (ClutterInputFocus *focus,
wl_resource_for_each (resource, &text_input->focus_resource_list)
{
zwp_text_input_v3_send_preedit_string (resource, text, cursor, cursor);
- zwp_text_input_v3_send_done (resource,
- lookup_serial (text_input, resource));
}
+
+ meta_wayland_text_input_focus_defer_done (focus);
}
static void
--
2.19.1

View File

@ -1,37 +0,0 @@
From 8200995fdbf04b2763d33cd30d7c8174eebc1736 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Sat, 20 Oct 2018 15:47:50 +0200
Subject: [PATCH 2/2] shaped-texture: Clean up texture regions
We allocated texture regions, but didn't free them when finished,
causing a leak.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/653
---
src/compositor/meta-shaped-texture.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 5328a919ea..cd151a28ed 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -516,6 +516,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
else
{
+ opaque_tex_region = NULL;
use_opaque_region = FALSE;
}
@@ -659,6 +660,8 @@ meta_shaped_texture_paint (ClutterActor *actor)
}
}
+ g_clear_pointer (&clip_tex_region, cairo_region_destroy);
+ g_clear_pointer (&opaque_tex_region, cairo_region_destroy);
g_clear_pointer (&blended_tex_region, cairo_region_destroy);
}
--
2.19.1

View File

@ -4,11 +4,11 @@
%global json_glib_version 0.12.0
%global libinput_version 1.4
%global pipewire_version 0.2.2
%global mutter_api_version 3
%global mutter_api_version 4
Name: mutter
Version: 3.31.2
Release: 2%{?dist}
Version: 3.31.4
Release: 1%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -16,13 +16,8 @@ License: GPLv2+
URL: http://www.gnome.org
Source0: http://download.gnome.org/sources/%{name}/3.31/%{name}-%{version}.tar.xz
Patch0: startup-notification.patch
# Work-around for OpenJDK's compliance test
Patch1: 0001-window-actor-Special-case-shaped-Java-windows.patch
# Fix disabled monitor when laptop lid is closed (rhbz#1638444)
Patch2: 0001-monitor-manager-Don-t-use-switch-config-when-ensurin.patch
Patch0: 0001-window-actor-Special-case-shaped-Java-windows.patch
BuildRequires: chrpath
BuildRequires: pango-devel
@ -64,7 +59,8 @@ BuildRequires: desktop-file-utils
BuildRequires: gtk-doc gnome-common gettext-devel git
BuildRequires: libcanberra-devel
BuildRequires: gsettings-desktop-schemas-devel >= %{gsettings_desktop_schemas_version}
BuildRequires: automake, autoconf, libtool
BuildRequires: gnome-settings-daemon-devel
BuildRequires: meson
BuildRequires: pkgconfig(gudev-1.0)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(gbm)
@ -75,6 +71,7 @@ BuildRequires: json-glib-devel >= %{json_glib_version}
BuildRequires: libgudev1-devel
BuildRequires: libwayland-server-devel
BuildRequires: libinput-devel >= %{libinput_version}
BuildRequires: xorg-x11-server-Xwayland
Obsoletes: mutter-wayland < 3.13.0
Obsoletes: mutter-wayland-devel < 3.13.0
@ -126,30 +123,11 @@ the functionality of the installed %{name} package.
%autosetup -S git
%build
autoreconf -f -i
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; fi;
%configure --disable-static --enable-compile-warnings=maximum --enable-remote-desktop --enable-installed-tests --with-libwacom --enable-egl-device)
SHOULD_HAVE_DEFINED="HAVE_SM HAVE_STARTUP_NOTIFICATION"
for I in $SHOULD_HAVE_DEFINED; do
if ! grep -q "define $I" config.h; then
echo "$I was not defined in config.h"
grep "$I" config.h
exit 1
else
echo "$I was defined as it should have been"
grep "$I" config.h
fi
done
make %{?_smp_mflags} V=1
%meson -Degl_device=true -Dwayland_eglstream=true
%meson_build
%install
%make_install
# Remove libtool archives
find %{buildroot} -name "*.la" -print -delete
%meson_install
%find_lang %{name}
@ -180,15 +158,14 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_libdir}/pkgconfig/*
%files tests
%{_libexecdir}/installed-tests/mutter
%{_libexecdir}/installed-tests/mutter-clutter
%{_libexecdir}/installed-tests/mutter-cogl
%{_datadir}/installed-tests/mutter
%{_datadir}/installed-tests/mutter-clutter
%{_datadir}/installed-tests/mutter-cogl
%{_libexecdir}/installed-tests/mutter-%{mutter_api_version}
%{_datadir}/installed-tests/mutter-%{mutter_api_version}
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Thu Jan 10 2019 Florian Müllner <fmuellner@redhat.com> - 3.31.4-1
- Update to 3.31.4
* Sat Nov 17 2018 Kalev Lember <klember@redhat.com> - 3.31.2-2
- Remove libtool .la files from private libs (#1622944)

View File

@ -1 +1 @@
SHA512 (mutter-3.31.2.tar.xz) = 3acd15ecd5d6c667c1dc54505ec73f7a6a57c974151dc7e3483a644d22246ef1bc0df5c10f662578d17ed5f26cb51878931ce420b7cd923f3b14d468d44b99d5
SHA512 (mutter-3.31.4.tar.xz) = 8c24dfd1a53558cdb3cf3ec925155a2cf31c75e10e70cde61272d44232b2fed2c1d0570af3a95b44e874bda6cef50f292c2cdf0f3de019417261488ec67d3152

View File

@ -1,45 +0,0 @@
From 4ed430b4ef3013c96fa56cdc57b925b42d20ead9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 20 Oct 2016 18:00:04 +0200
Subject: [PATCH] gtk-shell: Work around non-working startup notifications
GNOME Shell relies on the MetaScreen::startup-sequence-changed signal,
which is tied to (lib)startup-notification and therefore X11. As a result,
when we remove the startup sequence of a wayland client, GNOME Shell will
not be notified about this until startup-notification's timeout is hit.
As a temporary stop-gap, go through XWayland even for wayland clients,
so that the signal is emitted when expected.
https://bugzilla.gnome.org/show_bug.cgi?id=768531
---
src/wayland/meta-wayland-gtk-shell.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/wayland/meta-wayland-gtk-shell.c b/src/wayland/meta-wayland-gtk-shell.c
index d6e249f..9d1a19e 100644
--- a/src/wayland/meta-wayland-gtk-shell.c
+++ b/src/wayland/meta-wayland-gtk-shell.c
@@ -219,11 +219,21 @@ gtk_shell_set_startup_id (struct wl_client *client,
struct wl_resource *resource,
const char *startup_id)
{
+#if 0
MetaDisplay *display;
display = meta_get_display ();
meta_startup_notification_remove_sequence (display->startup_notification,
startup_id);
+#else
+ /* HACK: MetaScreen::startup-sequence-changed is currently tied to
+ (lib)startup-notification, which means it only works on X11;
+ so for now, always go through XWayland, even for wayland clients */
+ gdk_x11_display_broadcast_startup_message (gdk_display_get_default (),
+ "remove",
+ "ID", startup_id,
+ NULL);
+#endif
}
static void
--
2.9.3