Accepting request 443042 from home:dimstar:branches:GNOME:Factory
- Add mutter-x11-meta.patch: Don't try setting unavailable scroll methods; libinput acts really bad on it (bgo#775337, bgo#771744, boo#1011356). OBS-URL: https://build.opensuse.org/request/show/443042 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/mutter?expand=0&rev=221
This commit is contained in:
parent
7a6e0722dd
commit
4f44ba6f37
74
mutter-x11-meta.patch
Normal file
74
mutter-x11-meta.patch
Normal file
@ -0,0 +1,74 @@
|
||||
commit 5c46094d67f2e5cdafe6edcfd8c0d5894a2dafc6
|
||||
Author: Rui Matos <tiagomatos@gmail.com>
|
||||
Date: Mon Nov 14 17:33:11 2016 +0100
|
||||
|
||||
meta-input-settings-x11: Don't try setting unavailable scroll methods
|
||||
|
||||
Since doing so causes BadValue X errors.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=771744
|
||||
|
||||
diff --git a/src/backends/x11/meta-input-settings-x11.c b/src/backends/x11/meta-input-settings-x11.c
|
||||
index 332997b..eccc68a 100644
|
||||
--- a/src/backends/x11/meta-input-settings-x11.c
|
||||
+++ b/src/backends/x11/meta-input-settings-x11.c
|
||||
@@ -222,19 +222,27 @@ meta_input_settings_x11_set_edge_scroll (MetaInputSettings *settings,
|
||||
gboolean edge_scroll_enabled)
|
||||
{
|
||||
guchar values[SCROLL_METHOD_NUM_FIELDS] = { 0 }; /* 2fg, edge, button. The last value is unused */
|
||||
- guchar *current;
|
||||
+ guchar *current = NULL;
|
||||
+ guchar *available = NULL;
|
||||
+
|
||||
+ available = get_property (device, "libinput Scroll Methods Available",
|
||||
+ XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
|
||||
+ if (!available || !available[SCROLL_METHOD_FIELD_EDGE])
|
||||
+ goto out;
|
||||
|
||||
current = get_property (device, "libinput Scroll Method Enabled",
|
||||
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
|
||||
if (!current)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
memcpy (values, current, SCROLL_METHOD_NUM_FIELDS);
|
||||
|
||||
values[SCROLL_METHOD_FIELD_EDGE] = !!edge_scroll_enabled;
|
||||
change_property (device, "libinput Scroll Method Enabled",
|
||||
XA_INTEGER, 8, &values, SCROLL_METHOD_NUM_FIELDS);
|
||||
+ out:
|
||||
meta_XFree (current);
|
||||
+ meta_XFree (available);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -243,19 +251,27 @@ meta_input_settings_x11_set_two_finger_scroll (MetaInputSettings *set
|
||||
gboolean two_finger_scroll_enabled)
|
||||
{
|
||||
guchar values[SCROLL_METHOD_NUM_FIELDS] = { 0 }; /* 2fg, edge, button. The last value is unused */
|
||||
- guchar *current;
|
||||
+ guchar *current = NULL;
|
||||
+ guchar *available = NULL;
|
||||
+
|
||||
+ available = get_property (device, "libinput Scroll Methods Available",
|
||||
+ XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
|
||||
+ if (!available || !available[SCROLL_METHOD_FIELD_2FG])
|
||||
+ goto out;
|
||||
|
||||
current = get_property (device, "libinput Scroll Method Enabled",
|
||||
XA_INTEGER, 8, SCROLL_METHOD_NUM_FIELDS);
|
||||
if (!current)
|
||||
- return;
|
||||
+ goto out;
|
||||
|
||||
memcpy (values, current, SCROLL_METHOD_NUM_FIELDS);
|
||||
|
||||
values[SCROLL_METHOD_FIELD_2FG] = !!two_finger_scroll_enabled;
|
||||
change_property (device, "libinput Scroll Method Enabled",
|
||||
XA_INTEGER, 8, &values, SCROLL_METHOD_NUM_FIELDS);
|
||||
+ out:
|
||||
meta_XFree (current);
|
||||
+ meta_XFree (available);
|
||||
}
|
||||
|
||||
static void
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 1 14:09:51 UTC 2016 - dimstar@opensuse.org
|
||||
|
||||
- Add mutter-x11-meta.patch: Don't try setting unavailable scroll
|
||||
methods; libinput acts really bad on it (bgo#775337, bgo#771744,
|
||||
boo#1011356).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 11 09:58:32 UTC 2016 - dimstar@opensuse.org
|
||||
|
||||
|
@ -40,6 +40,8 @@ Patch2: relax-some-constraints-on-CSD-windows-in-sle-classic.patch
|
||||
Patch3: mutter-bsc984738-grab-display.patch
|
||||
# PATCH-FIX-UPSTREAM mutter-fix-startup.patch bgo#768531 zaitor@opensuse.org -- Fix slow startup notification on wayland
|
||||
Patch6: mutter-fix-startup.patch
|
||||
# PATCH-FIX-UPSTREAM mutter-x11-meta.patch bgo#775337 bgo#771744 boo#1011356 dimstar@opensuse.org -- meta-input-settings-x11: Don't try setting unavailable scroll methods
|
||||
Patch7: mutter-x11-meta.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gobject-introspection-devel >= 0.9.5
|
||||
BuildRequires: libSM-devel
|
||||
@ -139,6 +141,7 @@ translation-update-upstream
|
||||
%patch3 -p1
|
||||
%endif
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
|
||||
%build
|
||||
%configure \
|
||||
|
Loading…
Reference in New Issue
Block a user