import mutter-3.32.2-68.el8

This commit is contained in:
CentOS Sources 2023-03-28 12:06:52 +00:00 committed by Stepan Oksanichenko
parent 81c4bb1356
commit 5e6e8f52c9
5 changed files with 175 additions and 47 deletions

View File

@ -1,4 +1,4 @@
From 471174ba6cf517baf8ff73e903202e1c73b6ec74 Mon Sep 17 00:00:00 2001
From 01803de944153694501cb64bb4250ba76ed945f5 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlosg@gnome.org>
Date: Thu, 19 Jan 2017 15:03:41 +0100
Subject: [PATCH] backends/x11: Support synaptics configuration
@ -6,11 +6,11 @@ Subject: [PATCH] backends/x11: Support synaptics configuration
The code is taken mostly as-is from g-s-d, so we can drag the
dead horse a bit longer.
---
src/backends/x11/meta-input-settings-x11.c | 268 +++++++++++++++++++++
1 file changed, 268 insertions(+)
src/backends/x11/meta-input-settings-x11.c | 267 +++++++++++++++++++++
1 file changed, 267 insertions(+)
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 89f07ee1f..051a1c605 100644
index 89f07ee1f..b2f5ca060 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -26,6 +26,7 @@
@ -21,7 +21,7 @@ index 89f07ee1f..051a1c605 100644
#include <string.h>
#include <X11/Xatom.h>
#include <X11/extensions/XInput2.h>
@@ -162,6 +163,180 @@ change_property (ClutterInputDevice *device,
@@ -162,6 +163,179 @@ change_property (ClutterInputDevice *device,
meta_XFree (data_ret);
}
@ -45,7 +45,6 @@ index 89f07ee1f..051a1c605 100644
+ gboolean left_handed)
+{
+ MetaDisplay *display = meta_get_display ();
+ MetaX11Display *x11_display = display ? display->x11_display : NULL;
+ MetaBackend *backend = meta_get_backend ();
+ Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
+ XDevice *xdevice;
@ -69,8 +68,7 @@ index 89f07ee1f..051a1c605 100644
+ XA_INTEGER, 8, tap_action, 7);
+ meta_XFree (tap_action);
+
+ if (x11_display)
+ meta_x11_error_trap_push (x11_display);
+ clutter_x11_trap_x_errors();
+ buttons = g_new (guchar, buttons_capacity);
+ n_buttons = XGetDeviceButtonMapping (xdisplay, xdevice,
+ buttons, buttons_capacity);
@ -90,7 +88,7 @@ index 89f07ee1f..051a1c605 100644
+ XSetDeviceButtonMapping (xdisplay, xdevice, buttons, n_buttons);
+ g_free (buttons);
+
+ if (x11_display && meta_x11_error_trap_pop_with_return (x11_display))
+ if (clutter_x11_untrap_x_errors())
+ {
+ g_warning ("Could not set synaptics touchpad left-handed for %s",
+ clutter_input_device_get_device_name (device));
@ -105,7 +103,6 @@ index 89f07ee1f..051a1c605 100644
+ gdouble speed)
+{
+ MetaDisplay *display = meta_get_display ();
+ MetaX11Display *x11_display = display ? display->x11_display : NULL;
+ MetaBackend *backend = meta_get_backend ();
+ Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
+ XDevice *xdevice;
@ -118,7 +115,10 @@ index 89f07ee1f..051a1c605 100644
+ if (!xdevice)
+ return;
+ /* Get the list of feedbacks for the device */
+ clutter_x11_trap_x_errors();
+ states = XGetFeedbackControl (xdisplay, xdevice, &num_feedbacks);
+ if (clutter_x11_untrap_x_errors())
+ return;
+ if (!states)
+ return;
+
@ -163,8 +163,7 @@ index 89f07ee1f..051a1c605 100644
+ denominator = -1;
+ }
+
+ if (x11_display)
+ meta_x11_error_trap_push (x11_display);
+ clutter_x11_trap_x_errors();
+
+ state = (XFeedbackState *) states;
+
@ -189,7 +188,7 @@ index 89f07ee1f..051a1c605 100644
+ state = (XFeedbackState *) ((char *) state + state->length);
+ }
+
+ if (x11_display && meta_x11_error_trap_pop_with_return (x11_display))
+ if (clutter_x11_untrap_x_errors())
+ {
+ g_warning ("Could not set synaptics touchpad acceleration for %s",
+ clutter_input_device_get_device_name (device));
@ -202,7 +201,7 @@ index 89f07ee1f..051a1c605 100644
static void
meta_input_settings_x11_set_send_events (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -170,6 +345,13 @@ meta_input_settings_x11_set_send_events (MetaInputSettings *settings,
@@ -170,6 +344,13 @@ meta_input_settings_x11_set_send_events (MetaInputSettings *settings,
guchar values[2] = { 0 }; /* disabled, disabled-on-external-mouse */
guchar *available;
@ -216,7 +215,7 @@ index 89f07ee1f..051a1c605 100644
available = get_property (device, "libinput Send Events Modes Available",
XA_INTEGER, 8, 2);
if (!available)
@@ -222,6 +404,12 @@ meta_input_settings_x11_set_speed (MetaInputSettings *settings,
@@ -222,6 +403,12 @@ meta_input_settings_x11_set_speed (MetaInputSettings *settings,
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
gfloat value = speed;
@ -229,7 +228,7 @@ index 89f07ee1f..051a1c605 100644
change_property (device, "libinput Accel Speed",
XInternAtom (xdisplay, "FLOAT", False),
32, &value, 1);
@@ -248,6 +436,19 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
@@ -248,6 +435,19 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
else
{
value = enabled ? 1 : 0;
@ -249,7 +248,7 @@ index 89f07ee1f..051a1c605 100644
change_property (device, "libinput Left Handed Enabled",
XA_INTEGER, 8, &value, 1);
}
@@ -271,6 +472,20 @@ meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
@@ -271,6 +471,20 @@ meta_input_settings_x11_set_tap_enabled (MetaInputSettings *settings,
{
guchar value = (enabled) ? 1 : 0;
@ -270,7 +269,7 @@ index 89f07ee1f..051a1c605 100644
change_property (device, "libinput Tapping Enabled",
XA_INTEGER, 8, &value, 1);
}
@@ -293,6 +508,27 @@ meta_input_settings_x11_set_invert_scroll (MetaInputSettings *settings,
@@ -293,6 +507,27 @@ meta_input_settings_x11_set_invert_scroll (MetaInputSettings *settings,
{
guchar value = (inverted) ? 1 : 0;
@ -298,7 +297,7 @@ index 89f07ee1f..051a1c605 100644
change_property (device, "libinput Natural Scrolling Enabled",
XA_INTEGER, 8, &value, 1);
}
@@ -306,6 +542,22 @@ meta_input_settings_x11_set_edge_scroll (MetaInputSettings *settings,
@@ -306,6 +541,22 @@ meta_input_settings_x11_set_edge_scroll (MetaInputSettings *settings,
guchar *current = NULL;
guchar *available = NULL;
@ -321,7 +320,7 @@ index 89f07ee1f..051a1c605 100644
available = get_property (device, "libinput Scroll Methods Available",
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
if (!available || !available[SCROLL_METHOD_FIELD_EDGE])
@@ -335,6 +587,22 @@ meta_input_settings_x11_set_two_finger_scroll (MetaInputSettings *set
@@ -335,6 +586,22 @@ meta_input_settings_x11_set_two_finger_scroll (MetaInputSettings *set
guchar *current = NULL;
guchar *available = NULL;
@ -345,5 +344,5 @@ index 89f07ee1f..051a1c605 100644
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
if (!available || !available[SCROLL_METHOD_FIELD_2FG])
--
2.21.0
2.36.1

View File

@ -0,0 +1,81 @@
From cf16c0d16b42215f35dcede6163235ad5ec1734b Mon Sep 17 00:00:00 2001
From: Mario Limonciello <mario.limonciello@amd.com>
Date: Thu, 18 Aug 2022 13:36:20 -0500
Subject: [PATCH] output/kms: Add more heuristics to decide when to offer
fallback modes
If the panel is connected via eDP and supports more than one mode
at different resolutions don't try to add more.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2586>
(cherry picked from commit 96aa0fb8536eca579ceb1b17d83e19cf9e3e9e81)
---
src/backends/native/meta-output-kms.c | 45 ++++++++++++++++++++++-----
1 file changed, 38 insertions(+), 7 deletions(-)
diff --git a/src/backends/native/meta-output-kms.c b/src/backends/native/meta-output-kms.c
index f3cc543c4d..44c25c5648 100644
--- a/src/backends/native/meta-output-kms.c
+++ b/src/backends/native/meta-output-kms.c
@@ -505,6 +505,43 @@ compare_modes (const void *one,
return g_strcmp0 (b->name, a->name);
}
+static gboolean
+are_all_modes_equally_sized (MetaOutput *output)
+{
+ MetaCrtcMode *base = output->modes[0];
+ int i;
+
+ for (i = 1; i < output->n_modes; i++)
+ {
+ MetaCrtcMode *crtc_mode = output->modes[i];
+
+ if (base->width != crtc_mode->width ||
+ base->height != crtc_mode->height)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+static void
+maybe_add_fallback_modes (MetaOutput *output,
+ MetaGpuKms *gpu_kms)
+{
+ MetaOutputKms *output_kms = output->driver_private;
+
+ if (!output_kms->has_scaling)
+ return;
+
+ if (output->n_modes == 0)
+ return;
+
+ if (output_kms->connector->connector_type == DRM_MODE_CONNECTOR_eDP &&
+ !are_all_modes_equally_sized (output))
+ return;
+
+ add_common_modes (output, gpu_kms);
+}
+
static gboolean
init_output_modes (MetaOutput *output,
MetaGpuKms *gpu_kms,
@@ -528,13 +565,7 @@ init_output_modes (MetaOutput *output,
output->preferred_mode = output->modes[i];
}
- /* FIXME: MSC feature bit? */
- /* Presume that if the output supports scaling, then we have
- * a panel fitter capable of adjusting any mode to suit.
- */
- if (output_kms->has_scaling)
- add_common_modes (output, gpu_kms);
-
+ maybe_add_fallback_modes (output, gpu_kms);
if (!output->modes)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--
2.37.1

View File

@ -0,0 +1,33 @@
From d33a244603d1dd63e2e25255af98f489c65645f6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
Date: Mon, 29 Aug 2022 16:01:48 +0200
Subject: [PATCH] workspace: Downgrade assert to warning when adding window
An extension can by accident cause us to end up in a state where we try
to add the same window to a workspace twice. When this happens we
shouldn't crash, but instead complain loudly.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/992
Related: https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/157
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1692>
---
src/core/workspace.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/core/workspace.c b/src/core/workspace.c
index 58fcfa78c5..ed16a83098 100644
--- a/src/core/workspace.c
+++ b/src/core/workspace.c
@@ -370,7 +370,8 @@ void
meta_workspace_add_window (MetaWorkspace *workspace,
MetaWindow *window)
{
- g_assert (g_list_find (workspace->mru_list, window) == NULL);
+ g_return_if_fail (g_list_find (workspace->mru_list, window) == NULL);
+
workspace->mru_list = g_list_prepend (workspace->mru_list, window);
workspace->windows = g_list_prepend (workspace->windows, window);
--
2.37.1

View File

@ -1,4 +1,4 @@
From 3f7ba6739773f43a3ad2a5d26cb8c3365f77cc00 Mon Sep 17 00:00:00 2001
From 08734c2df6bee5426cf75cdf1fa3013af1664d94 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Mon, 9 Oct 2017 18:39:52 +0200
Subject: [PATCH 1/3] backends/x11: Add a synaptics check for two finger scroll
@ -13,10 +13,10 @@ isn't.
1 file changed, 11 insertions(+)
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 051a1c605..887bc8b42 100644
index 16a3ff33d..7ad304704 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -630,6 +630,17 @@ meta_input_settings_x11_has_two_finger_scroll (MetaInputSettings *settings,
@@ -626,6 +626,17 @@ meta_input_settings_x11_has_two_finger_scroll (MetaInputSettings *settings,
guchar *available = NULL;
gboolean has_two_finger = TRUE;
@ -35,10 +35,9 @@ index 051a1c605..887bc8b42 100644
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
if (!available || !available[SCROLL_METHOD_FIELD_2FG])
--
2.21.0
2.36.1
From 717561b28f35e05d40fb941baba781436a0abf68 Mon Sep 17 00:00:00 2001
From 11a8b8b33582a68e037e7b9e8396af0748bba67a Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Mon, 9 Oct 2017 18:55:56 +0200
Subject: [PATCH 2/3] backends/x11: Add disable while typing support for
@ -51,7 +50,7 @@ syndaemon when the synaptics driver is being used.
1 file changed, 112 insertions(+)
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 887bc8b42..12a592c75 100644
index 7ad304704..743f4a7ce 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -35,6 +35,9 @@
@ -73,7 +72,7 @@ index 887bc8b42..12a592c75 100644
} MetaInputSettingsX11Private;
G_DEFINE_TYPE_WITH_PRIVATE (MetaInputSettingsX11, meta_input_settings_x11,
@@ -337,6 +342,107 @@ change_synaptics_speed (ClutterInputDevice *device,
@@ -333,6 +338,107 @@ change_synaptics_speed (ClutterInputDevice *device,
XCloseDevice (xdisplay, xdevice);
}
@ -181,7 +180,7 @@ index 887bc8b42..12a592c75 100644
static void
meta_input_settings_x11_set_send_events (MetaInputSettings *settings,
ClutterInputDevice *device,
@@ -461,6 +567,12 @@ meta_input_settings_x11_set_disable_while_typing (MetaInputSettings *settings,
@@ -457,6 +563,12 @@ meta_input_settings_x11_set_disable_while_typing (MetaInputSettings *settings,
{
guchar value = (enabled) ? 1 : 0;
@ -195,10 +194,9 @@ index 887bc8b42..12a592c75 100644
XA_INTEGER, 8, &value, 1);
}
--
2.21.0
2.36.1
From 0afa6d0940ca4f5ffafd24effd2c414963a44277 Mon Sep 17 00:00:00 2001
From fd2923d5c79a60bbd80bf231adf5e1ae7f83d264 Mon Sep 17 00:00:00 2001
From: Rui Matos <tiagomatos@gmail.com>
Date: Tue, 10 Oct 2017 19:07:27 +0200
Subject: [PATCH 3/3] backends/x11: Support plain old X device configuration
@ -210,10 +208,10 @@ bits specific for xorg-x11-drv-evdev devices.
1 file changed, 74 insertions(+), 23 deletions(-)
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
index 12a592c75..80e5ed10e 100644
index 743f4a7ce..85f24e92b 100644
--- a/src/backends/x11/meta-input-settings-x11.c
+++ b/src/backends/x11/meta-input-settings-x11.c
@@ -182,36 +182,36 @@ is_device_synaptics (ClutterInputDevice *device)
@@ -182,35 +182,35 @@ is_device_synaptics (ClutterInputDevice *device)
return TRUE;
}
@ -239,7 +237,6 @@ index 12a592c75..80e5ed10e 100644
+ gboolean left_handed)
{
MetaDisplay *display = meta_get_display ();
MetaX11Display *x11_display = display ? display->x11_display : NULL;
MetaBackend *backend = meta_get_backend ();
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
XDevice *xdevice;
@ -264,12 +261,12 @@ index 12a592c75..80e5ed10e 100644
- XA_INTEGER, 8, tap_action, 7);
- meta_XFree (tap_action);
-
if (x11_display)
meta_x11_error_trap_push (x11_display);
clutter_x11_trap_x_errors();
buttons = g_new (guchar, buttons_capacity);
@@ -235,17 +235,39 @@ change_synaptics_tap_left_handed (ClutterInputDevice *device,
n_buttons = XGetDeviceButtonMapping (xdisplay, xdevice,
@@ -233,17 +233,39 @@ change_synaptics_tap_left_handed (ClutterInputDevice *device,
if (x11_display && meta_x11_error_trap_pop_with_return (x11_display))
if (clutter_x11_untrap_x_errors())
{
- g_warning ("Could not set synaptics touchpad left-handed for %s",
+ g_warning ("Could not set left-handed for %s",
@ -310,8 +307,8 @@ index 12a592c75..80e5ed10e 100644
+ gdouble speed)
{
MetaDisplay *display = meta_get_display ();
MetaX11Display *x11_display = display ? display->x11_display : NULL;
@@ -342,6 +364,23 @@ change_synaptics_speed (ClutterInputDevice *device,
MetaBackend *backend = meta_get_backend ();
@@ -338,6 +360,23 @@ change_synaptics_speed (ClutterInputDevice *device,
XCloseDevice (xdisplay, xdevice);
}
@ -335,7 +332,7 @@ index 12a592c75..80e5ed10e 100644
/* Ensure that syndaemon dies together with us, to avoid running several of
* them */
static void
@@ -510,9 +549,10 @@ meta_input_settings_x11_set_speed (MetaInputSettings *settings,
@@ -506,9 +545,10 @@ meta_input_settings_x11_set_speed (MetaInputSettings *settings,
Display *xdisplay = meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend));
gfloat value = speed;
@ -348,7 +345,7 @@ index 12a592c75..80e5ed10e 100644
return;
}
@@ -554,6 +594,11 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
@@ -550,6 +590,11 @@ meta_input_settings_x11_set_left_handed (MetaInputSettings *settings,
g_object_unref (settings);
return;
}
@ -360,7 +357,7 @@ index 12a592c75..80e5ed10e 100644
change_property (device, "libinput Left Handed Enabled",
XA_INTEGER, 8, &value, 1);
@@ -767,6 +812,12 @@ meta_input_settings_x11_set_scroll_button (MetaInputSettings *settings,
@@ -763,6 +808,12 @@ meta_input_settings_x11_set_scroll_button (MetaInputSettings *settings,
ClutterInputDevice *device,
guint button)
{
@ -374,5 +371,5 @@ index 12a592c75..80e5ed10e 100644
XA_INTEGER, 32, &button, 1);
}
--
2.21.0
2.36.1

View File

@ -8,7 +8,7 @@
Name: mutter
Version: 3.32.2
Release: 65%{?dist}
Release: 68%{?dist}
Summary: Window and compositing manager based on Clutter
License: GPLv2+
@ -204,6 +204,12 @@ Patch527: 0001-compositor-Make-sure-_NET_WM_FRAME_DRAWN-timestamp-h.patch
# Fix race condition causing stuck pointer grabs (#2090168)
Patch528: 0001-events-Pass-CurrentTime-to-XIAllowEvents-when-unfree.patch
# Downgrade assert to warning (#2089311)
Patch529: 0001-workspace-Downgrade-assert-to-warning-when-adding-wi.patch
# Don't add common modes if panel already has (#2125031)
Patch530: 0001-output-kms-Add-more-heuristics-to-decide-when-to-off.patch
BuildRequires: chrpath
BuildRequires: pango-devel
BuildRequires: startup-notification-devel
@ -345,6 +351,18 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%{_datadir}/mutter-%{mutter_api_version}/tests
%changelog
* Wed Dec 21 2022 Olivier Fourdan <ofourdan@redhat.com> - 3.32.2-68
- Fix downstream synaptics patches breaking xdmcp
Resolves: #2092450
* Thu Oct 20 2022 Jonas Ådahl <jadahl@redhat.com>) - 3.32.2-67
- Don't add common modes if panel already has
Resolves: #2125031
* Mon Aug 29 2022 Jonas Ådahl <jadahl@redhat.com>) - 3.32.2-66
- Downgrade assert to warning
Resolves: #2089311
* Mon Jun 27 2022 Jonas Ådahl <jadahl@redhat.com>) - 3.32.2-65
- Fix race condition causing stuck pointer grabs
Resolves: #2090168