From 17769b0d70b4c70071ea1f94fdef4b6cc8a8b1df Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Sat, 27 Jun 2015 09:23:19 -0500 Subject: [PATCH] pull in upstream fix for kcm_touchpad: No touchpad found (#1199825) --- ...-Fix-touchpad-backend-initialization.patch | 74 +++++++++++++++++++ plasma-desktop-5.3.1-touchpad_backend.patch | 20 ----- plasma-desktop.spec | 9 ++- 3 files changed, 80 insertions(+), 23 deletions(-) create mode 100644 0001-Fix-touchpad-backend-initialization.patch delete mode 100644 plasma-desktop-5.3.1-touchpad_backend.patch diff --git a/0001-Fix-touchpad-backend-initialization.patch b/0001-Fix-touchpad-backend-initialization.patch new file mode 100644 index 0000000..401a28d --- /dev/null +++ b/0001-Fix-touchpad-backend-initialization.patch @@ -0,0 +1,74 @@ +From 3f2e6bd31e0cd7355f95450cdc185e4d37ed2c16 Mon Sep 17 00:00:00 2001 +From: Rajeesh K Nambiar +Date: Sat, 27 Jun 2015 13:58:17 +0200 +Subject: [PATCH] Fix touchpad backend initialization. + +Libinput driver, even when unistalled was leaving 'Libinput Tapping +Enabled' atom active (xlsatoms | grep -i tap). Mutter/Clutter/Gtk+ were +causing this, as noted in https://bugzilla.redhat.com/show_bug.cgi? +id=1199825. This caused the non-existent libinput backend initialization +resulting in 'No touchpad found' error even when synaptics driver was +installed. +Fix this by checking backend instantiation errors. + +BUG: 344958,349214 +REVIEW: 124172 +FIXED-IN: 5.4.0 +--- + kcms/touchpad/src/backends/x11/xlibbackend.cpp | 20 +++++++++++++------- + 1 file changed, 13 insertions(+), 7 deletions(-) + +diff --git a/kcms/touchpad/src/backends/x11/xlibbackend.cpp b/kcms/touchpad/src/backends/x11/xlibbackend.cpp +index 2acb162..b55a45f 100644 +--- a/kcms/touchpad/src/backends/x11/xlibbackend.cpp ++++ b/kcms/touchpad/src/backends/x11/xlibbackend.cpp +@@ -151,8 +151,10 @@ XlibSynapticsBackend::XlibSynapticsBackend(QObject *parent) : + XlibBackend(parent) + { + m_capsAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES); +- if (!m_capsAtom.atom()) ++ if (!m_capsAtom.atom()) { ++ m_errorString = i18nc("Synaptics touchpad driver","Synaptics backend not found"); + return; ++ } + + m_device = findTouchpad(m_capsAtom); + if (m_device == XIAllDevices) { +@@ -275,8 +277,10 @@ XlibLibinputBackend::XlibLibinputBackend(QObject *parent) : + "libinput Tapping Enabled", + true); + +- if (!identifier.atom()) ++ if (!identifier.atom()) { ++ m_errorString = i18nc("Libinput touchpad driver","Libinput backend not found"); + return; ++ } + + m_device = findTouchpad(identifier); + if (m_device == XIAllDevices) { +@@ -318,15 +322,17 @@ XlibLibinputBackend::XlibLibinputBackend(QObject *parent) : + + XlibBackend* XlibBackend::initialize(QObject *parent) + { ++ XlibBackend* backend = nullptr; + QScopedPointer display(XOpenDisplay(0)); + xcb_connection_t *connection = XGetXCBConnection(display.data()); + XcbAtom synaptics_prop_capablities, libinput_prop_tapping; + +- libinput_prop_tapping.intern(connection, "libinput Tapping Enabled"); +- if (libinput_prop_tapping.atom()) +- return new XlibLibinputBackend(parent); +- else +- return new XlibSynapticsBackend(parent); ++ backend = new XlibLibinputBackend(parent); ++ if (! backend->errorString().isNull()) { ++ delete backend; ++ backend = new XlibSynapticsBackend(parent); ++ } ++ return backend; + } + + XlibBackend::~XlibBackend() +-- +2.4.3 + diff --git a/plasma-desktop-5.3.1-touchpad_backend.patch b/plasma-desktop-5.3.1-touchpad_backend.patch deleted file mode 100644 index 43d5c48..0000000 --- a/plasma-desktop-5.3.1-touchpad_backend.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -ur plasma-desktop-5.3.1/kcms/touchpad/src/backends/x11/xlibbackend.cpp plasma-desktop-5.3.1-patched/kcms/touchpad/src/backends/x11/xlibbackend.cpp ---- plasma-desktop-5.3.1/kcms/touchpad/src/backends/x11/xlibbackend.cpp 2015-05-21 11:56:56.000000000 -0500 -+++ plasma-desktop-5.3.1-patched/kcms/touchpad/src/backends/x11/xlibbackend.cpp 2015-06-23 14:37:18.191713320 -0500 -@@ -322,11 +322,16 @@ - xcb_connection_t *connection = XGetXCBConnection(display.data()); - XcbAtom synaptics_prop_capablities, libinput_prop_tapping; - -+ synaptics_prop_capablities.intern(connection,"synaptics Tap Action"); -+ if (synaptics_prop_capablities.atom()) { -+ return new XlibSynapticsBackend(parent); -+ } else { - libinput_prop_tapping.intern(connection, "libinput Tapping Enabled"); - if (libinput_prop_tapping.atom()) - return new XlibLibinputBackend(parent); - else - return new XlibSynapticsBackend(parent); -+ } - } - - XlibBackend::~XlibBackend() diff --git a/plasma-desktop.spec b/plasma-desktop.spec index 7ee2cff..6dc182f 100644 --- a/plasma-desktop.spec +++ b/plasma-desktop.spec @@ -1,6 +1,6 @@ Name: plasma-desktop Version: 5.3.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Plasma Desktop shell License: GPLv2+ and (GPLv2 or GPLv3) @@ -23,10 +23,10 @@ Patch101: plasma-desktop-fix-fontinst-service-path.patch Patch102: plasma-desktop-fedora_layout.patch ## upstream patches +# master branch +Patch1: 0001-Fix-touchpad-backend-initialization.patch ## upstreamable patches -# https://bugzilla.redhat.com/show_bug.cgi?id=1199825#c11 -Patch50: plasma-desktop-5.3.1-touchpad_backend.patch BuildRequires: libusb-devel BuildRequires: fontconfig-devel @@ -284,6 +284,9 @@ fi %changelog +* Sat Jun 27 2015 Rex Dieter 5.3.2-2 +- pull in upstream fix for kcm_touchpad: No touchpad found (#1199825) + * Thu Jun 25 2015 Daniel Vrátil - 5.3.2-1 - Plasma 5.3.2