[kcm_touchpad] 5.1.95-1
Rex Dieter
rdieter at fedoraproject.org
Thu Feb 12 19:51:16 UTC 2015
commit f38bd2a1d59afbc7bb999d0127fa0981d869cf88
Author: Rex Dieter <rdieter at math.unl.edu>
Date: Thu Feb 12 13:51:07 2015 -0600
5.1.95-1
- Plasma 5.1.95
- plus post-5.1.95 commits, including new libinput support
.gitignore | 2 +-
0009-fix-initializing-the-dataengine.patch | 46 ++
0010-properly-extract-from-UI-files.patch | 25 +
0011-fix-notifications.patch | 25 +
...E-PluginInfo-EnabledByDefault-true-to-mat.patch | 28 ++
0017-load-the-translation-catalog-correctly.patch | 138 ++++++
0018-load-the-translation-catalog-correctly.patch | 138 ++++++
...-name-enum-name-in-KF5.-fix-icon-status-u.patch | 40 ++
...tcut-won-t-unregister-by-open-and-close-c.patch | 86 ++++
...shortcuts-for-touchpad-enable-disable-tog.patch | 52 ++
0023-Fix-build.patch | 25 +
0025-Add-libinput-support-to-touchpad-kcm.patch | 510 ++++++++++++++++++++
0026-add-missing-libinputproperties.c.patch | 56 +++
kcm_touchpad.spec | 135 ++++--
sources | 2 +-
15 files changed, 1261 insertions(+), 47 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 02dbba2..be87e33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/kcm-touchpad-1.1.tar.xz
+/kcm-touchpad-5.1.95.tar.xz
diff --git a/0009-fix-initializing-the-dataengine.patch b/0009-fix-initializing-the-dataengine.patch
new file mode 100644
index 0000000..c72220b
--- /dev/null
+++ b/0009-fix-initializing-the-dataengine.patch
@@ -0,0 +1,46 @@
+From 51c11b8ff4776b5de02cfa5eff302b4551267356 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Fri, 16 Jan 2015 09:59:36 +0100
+Subject: [PATCH 09/25] fix initializing the dataengine
+
+init() is no longer a virtual
+---
+ src/applet/touchpadengine.cpp | 1 +
+ src/applet/touchpadengine.h | 4 +---
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/applet/touchpadengine.cpp b/src/applet/touchpadengine.cpp
+index 951cbb6..0b30d71 100644
+--- a/src/applet/touchpadengine.cpp
++++ b/src/applet/touchpadengine.cpp
+@@ -27,6 +27,7 @@
+ TouchpadEngine::TouchpadEngine(QObject *parent, const QVariantList &args)
+ : Plasma::DataEngine(parent, args), m_source("touchpad"), m_daemon(0)
+ {
++ init();
+ }
+
+ void TouchpadEngine::init()
+diff --git a/src/applet/touchpadengine.h b/src/applet/touchpadengine.h
+index bf7bd5f..16b98c2 100644
+--- a/src/applet/touchpadengine.h
++++ b/src/applet/touchpadengine.h
+@@ -32,14 +32,12 @@ public:
+
+ Plasma::Service *serviceForSource(const QString &source);
+
+-protected:
+- void init();
+-
+ private Q_SLOTS:
+ void mousePluggedInChanged(bool);
+ void enabledChanged(bool);
+
+ private:
++ void init();
+ QString m_source;
+ OrgKdeTouchpadInterface *m_daemon;
+ };
+--
+1.9.3
+
diff --git a/0010-properly-extract-from-UI-files.patch b/0010-properly-extract-from-UI-files.patch
new file mode 100644
index 0000000..7df9fca
--- /dev/null
+++ b/0010-properly-extract-from-UI-files.patch
@@ -0,0 +1,25 @@
+From 33cc4164fc777b1dae477810c1f67697bf161d14 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Fri, 16 Jan 2015 10:00:11 +0100
+Subject: [PATCH 10/25] properly extract from UI files
+
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index d7924c9..4489443 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -26,7 +26,7 @@ qt5_add_dbus_interfaces(SRCS
+
+ kconfig_add_kcfg_files(SRCS kcm/touchpadparameters.kcfgc)
+
+-qt5_wrap_ui(SRCS
++ki18n_wrap_ui(SRCS
+ kcm/ui/pointermotion.ui
+ kcm/ui/tap.ui
+ kcm/ui/scroll.ui
+--
+1.9.3
+
diff --git a/0011-fix-notifications.patch b/0011-fix-notifications.patch
new file mode 100644
index 0000000..7fb0826
--- /dev/null
+++ b/0011-fix-notifications.patch
@@ -0,0 +1,25 @@
+From ff08aec8b49674acd5f53f3f77ee07c013930a8c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Fri, 16 Jan 2015 10:00:33 +0100
+Subject: [PATCH 11/25] fix notifications
+
+---
+ src/kded/kded.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/kded/kded.cpp b/src/kded/kded.cpp
+index 3b12e28..52389b6 100644
+--- a/src/kded/kded.cpp
++++ b/src/kded/kded.cpp
+@@ -207,7 +207,7 @@ void TouchpadDisabler::showNotification(const QString &name, const QString &text
+ KNotification::event(name, text, QPixmap(), //Icon is specified in .notifyrc
+ 0,
+ KNotification::CloseOnTimeout,
+- moduleName());
++ "kcm_touchpad"); // this has to match the name of the .notifyrc file
+ //TouchpadPluginFactory::componentData());
+ }
+
+--
+1.9.3
+
diff --git a/0012-Update-X-KDE-PluginInfo-EnabledByDefault-true-to-mat.patch b/0012-Update-X-KDE-PluginInfo-EnabledByDefault-true-to-mat.patch
new file mode 100644
index 0000000..9fc0e5d
--- /dev/null
+++ b/0012-Update-X-KDE-PluginInfo-EnabledByDefault-true-to-mat.patch
@@ -0,0 +1,28 @@
+From 462aa9d517341c16e75b283d1e54acaa3f5ef9d5 Mon Sep 17 00:00:00 2001
+From: David Edmundson <kde at davidedmundson.co.uk>
+Date: Sun, 18 Jan 2015 00:40:41 +0100
+Subject: [PATCH 12/25] Update X-KDE-PluginInfo-EnabledByDefault=true to match
+ Plasma changes.
+
+X-KDE-PluginInfo-EnabledByDefault=true now makes applets appear
+autoamtically on first run, which probably isn't needed for this
+particular applet
+---
+ src/applet/qml/metadata.desktop | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/applet/qml/metadata.desktop b/src/applet/qml/metadata.desktop
+index 06a9083..b2030cd 100644
+--- a/src/applet/qml/metadata.desktop
++++ b/src/applet/qml/metadata.desktop
+@@ -84,7 +84,6 @@ X-KDE-ParentApp=
+ X-KDE-PluginInfo-Author=Alexander Mezin
+ X-KDE-PluginInfo-Category=System Information
+ X-KDE-PluginInfo-Email=mezin.alexander at gmail.com
+-X-KDE-PluginInfo-EnabledByDefault=true
+ X-KDE-PluginInfo-License=GPL
+ X-KDE-PluginInfo-Name=touchpad
+ X-KDE-PluginInfo-Version=@TOUCHPAD_KCM_VERSION@
+--
+1.9.3
+
diff --git a/0017-load-the-translation-catalog-correctly.patch b/0017-load-the-translation-catalog-correctly.patch
new file mode 100644
index 0000000..ec94d51
--- /dev/null
+++ b/0017-load-the-translation-catalog-correctly.patch
@@ -0,0 +1,138 @@
+From 7494875a95ccfacc407eb0278f8c1deb71b2b949 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Thu, 22 Jan 2015 17:20:38 +0100
+Subject: [PATCH 17/25] load the translation catalog correctly
+
+also unbreak the dataengine loading and the applet
+---
+ CMakeLists.txt | 1 +
+ src/applet/CMakeLists.txt | 9 +++++++--
+ src/applet/dataengine.desktop | 2 --
+ src/applet/qml/contents/ui/touchpad.qml | 33 ++++++++++++++++-----------------
+ src/applet/touchpadengine.cpp | 4 +++-
+ 5 files changed, 27 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4b37326..4354b1f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,7 @@
+ project(kcm-touchpad)
+ set(PROJECT_VERSION "5.1.95")
+ cmake_minimum_required(VERSION 2.8.12)
++add_definitions(-DTRANSLATION_DOMAIN=\"kcm_touchpad\")
+
+ set(CMAKE_MODULE_PATH
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
+diff --git a/src/applet/CMakeLists.txt b/src/applet/CMakeLists.txt
+index 6355de3..e14b738 100644
+--- a/src/applet/CMakeLists.txt
++++ b/src/applet/CMakeLists.txt
+@@ -1,3 +1,6 @@
++remove_definitions(-DTRANSLATION_DOMAIN="kcm_touchpad")
++add_definitions(-DTRANSLATION_DOMAIN="plasma_applet_touchpad")
++
+ add_subdirectory(qml)
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dataengine.desktop"
+@@ -23,14 +26,16 @@ target_link_libraries(plasma_engine_touchpad
+ Qt5::DBus
+ )
+
++kcoreaddons_desktop_to_json(plasma_engine_touchpad ${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop)
++
+ install(TARGETS plasma_engine_touchpad
+- DESTINATION ${PLUGIN_INSTALL_DIR}
++ DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine
+ )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+ )
+ install(FILES touchpad.operations
+- DESTINATION ${DATA_INSTALL_DIR}/plasma/services
++ DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services
+ )
+ install(FILES touchpad.svg
+ DESTINATION ${DATA_INSTALL_DIR}/plasma/desktoptheme/default/icons
+diff --git a/src/applet/dataengine.desktop b/src/applet/dataengine.desktop
+index 4978c11..cfba830 100644
+--- a/src/applet/dataengine.desktop
++++ b/src/applet/dataengine.desktop
+@@ -43,5 +43,3 @@ X-KDE-PluginInfo-Website=https://projects.kde.org/projects/playground/utils/kcm-
+ X-KDE-PluginInfo-Depends=
+ X-KDE-PluginInfo-License=GPL
+ X-KDE-PluginInfo-EnabledByDefault=true
+-
+-X-Plasma-EngineName=touchpad
+diff --git a/src/applet/qml/contents/ui/touchpad.qml b/src/applet/qml/contents/ui/touchpad.qml
+index 2dcb808..00f0f5d 100644
+--- a/src/applet/qml/contents/ui/touchpad.qml
++++ b/src/applet/qml/contents/ui/touchpad.qml
+@@ -21,7 +21,6 @@
+ import QtQuick 2.0
+ import org.kde.plasma.core 2.0 as PlasmaCore
+ import org.kde.plasma.components 2.0 as PlasmaComponents
+-import org.kde.qtextracomponents 2.0
+
+ Item {
+ id: root
+@@ -84,28 +83,28 @@ Item {
+ }
+ }
+
+- QIconItem {
++ PlasmaCore.IconItem {
+ anchors.fill: parent
+ visible: !hasTouchpad
+- icon: "dialog-warning"
+- }
++ source: "dialog-warning"
+
+- PlasmaCore.ToolTip {
+- target: root
+- mainText: {
+- if (!hasTouchpad) {
+- return i18n("No touchpad was found");
+- }
+
+- return enabled ? i18n("Touchpad is enabled")
+- : i18n("Touchpad is disabled")
+- }
+- image: {
+- if (!hasTouchpad) {
+- return "dialog-error"
++ PlasmaCore.ToolTipArea {
++ mainText: {
++ if (!hasTouchpad) {
++ return i18n("No touchpad was found");
++ }
++
++ return enabled ? i18n("Touchpad is enabled")
++ : i18n("Touchpad is disabled")
+ }
++ image: {
++ if (!hasTouchpad) {
++ return "dialog-error"
++ }
+
+- return enabled ? "input-touchpad" : "process-stop"
++ return enabled ? "input-touchpad" : "process-stop"
++ }
+ }
+ }
+
+diff --git a/src/applet/touchpadengine.cpp b/src/applet/touchpadengine.cpp
+index 0b30d71..eae429e 100644
+--- a/src/applet/touchpadengine.cpp
++++ b/src/applet/touchpadengine.cpp
+@@ -80,4 +80,6 @@ TouchpadEngine::~TouchpadEngine()
+ {
+ }
+
+-//K_EXPORT_PLASMA_DATAENGINE(touchpad, TouchpadEngine)
++K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(touchpad, TouchpadEngine, "plasma-dataengine-touchpad.json")
++
++#include "touchpadengine.moc"
+--
+1.9.3
+
diff --git a/0018-load-the-translation-catalog-correctly.patch b/0018-load-the-translation-catalog-correctly.patch
new file mode 100644
index 0000000..5fb6569
--- /dev/null
+++ b/0018-load-the-translation-catalog-correctly.patch
@@ -0,0 +1,138 @@
+From b935d042b9408217cf21590b77934a48c62af3ee Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Thu, 22 Jan 2015 17:20:38 +0100
+Subject: [PATCH 18/25] load the translation catalog correctly
+
+also unbreak the dataengine loading and the applet
+---
+ CMakeLists.txt | 1 +
+ src/applet/CMakeLists.txt | 9 +++++++--
+ src/applet/dataengine.desktop | 2 --
+ src/applet/qml/contents/ui/touchpad.qml | 33 ++++++++++++++++-----------------
+ src/applet/touchpadengine.cpp | 4 +++-
+ 5 files changed, 27 insertions(+), 22 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4b37326..4354b1f 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,7 @@
+ project(kcm-touchpad)
+ set(PROJECT_VERSION "5.1.95")
+ cmake_minimum_required(VERSION 2.8.12)
++add_definitions(-DTRANSLATION_DOMAIN=\"kcm_touchpad\")
+
+ set(CMAKE_MODULE_PATH
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
+diff --git a/src/applet/CMakeLists.txt b/src/applet/CMakeLists.txt
+index 6355de3..e14b738 100644
+--- a/src/applet/CMakeLists.txt
++++ b/src/applet/CMakeLists.txt
+@@ -1,3 +1,6 @@
++remove_definitions(-DTRANSLATION_DOMAIN="kcm_touchpad")
++add_definitions(-DTRANSLATION_DOMAIN="plasma_applet_touchpad")
++
+ add_subdirectory(qml)
+
+ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dataengine.desktop"
+@@ -23,14 +26,16 @@ target_link_libraries(plasma_engine_touchpad
+ Qt5::DBus
+ )
+
++kcoreaddons_desktop_to_json(plasma_engine_touchpad ${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop)
++
+ install(TARGETS plasma_engine_touchpad
+- DESTINATION ${PLUGIN_INSTALL_DIR}
++ DESTINATION ${PLUGIN_INSTALL_DIR}/plasma/dataengine
+ )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+ )
+ install(FILES touchpad.operations
+- DESTINATION ${DATA_INSTALL_DIR}/plasma/services
++ DESTINATION ${PLASMA_DATA_INSTALL_DIR}/services
+ )
+ install(FILES touchpad.svg
+ DESTINATION ${DATA_INSTALL_DIR}/plasma/desktoptheme/default/icons
+diff --git a/src/applet/dataengine.desktop b/src/applet/dataengine.desktop
+index 4978c11..cfba830 100644
+--- a/src/applet/dataengine.desktop
++++ b/src/applet/dataengine.desktop
+@@ -43,5 +43,3 @@ X-KDE-PluginInfo-Website=https://projects.kde.org/projects/playground/utils/kcm-
+ X-KDE-PluginInfo-Depends=
+ X-KDE-PluginInfo-License=GPL
+ X-KDE-PluginInfo-EnabledByDefault=true
+-
+-X-Plasma-EngineName=touchpad
+diff --git a/src/applet/qml/contents/ui/touchpad.qml b/src/applet/qml/contents/ui/touchpad.qml
+index 2dcb808..00f0f5d 100644
+--- a/src/applet/qml/contents/ui/touchpad.qml
++++ b/src/applet/qml/contents/ui/touchpad.qml
+@@ -21,7 +21,6 @@
+ import QtQuick 2.0
+ import org.kde.plasma.core 2.0 as PlasmaCore
+ import org.kde.plasma.components 2.0 as PlasmaComponents
+-import org.kde.qtextracomponents 2.0
+
+ Item {
+ id: root
+@@ -84,28 +83,28 @@ Item {
+ }
+ }
+
+- QIconItem {
++ PlasmaCore.IconItem {
+ anchors.fill: parent
+ visible: !hasTouchpad
+- icon: "dialog-warning"
+- }
++ source: "dialog-warning"
+
+- PlasmaCore.ToolTip {
+- target: root
+- mainText: {
+- if (!hasTouchpad) {
+- return i18n("No touchpad was found");
+- }
+
+- return enabled ? i18n("Touchpad is enabled")
+- : i18n("Touchpad is disabled")
+- }
+- image: {
+- if (!hasTouchpad) {
+- return "dialog-error"
++ PlasmaCore.ToolTipArea {
++ mainText: {
++ if (!hasTouchpad) {
++ return i18n("No touchpad was found");
++ }
++
++ return enabled ? i18n("Touchpad is enabled")
++ : i18n("Touchpad is disabled")
+ }
++ image: {
++ if (!hasTouchpad) {
++ return "dialog-error"
++ }
+
+- return enabled ? "input-touchpad" : "process-stop"
++ return enabled ? "input-touchpad" : "process-stop"
++ }
+ }
+ }
+
+diff --git a/src/applet/touchpadengine.cpp b/src/applet/touchpadengine.cpp
+index 0b30d71..eae429e 100644
+--- a/src/applet/touchpadengine.cpp
++++ b/src/applet/touchpadengine.cpp
+@@ -80,4 +80,6 @@ TouchpadEngine::~TouchpadEngine()
+ {
+ }
+
+-//K_EXPORT_PLASMA_DATAENGINE(touchpad, TouchpadEngine)
++K_EXPORT_PLASMA_DATAENGINE_WITH_JSON(touchpad, TouchpadEngine, "plasma-dataengine-touchpad.json")
++
++#include "touchpadengine.moc"
+--
+1.9.3
+
diff --git a/0019-use-correct-name-enum-name-in-KF5.-fix-icon-status-u.patch b/0019-use-correct-name-enum-name-in-KF5.-fix-icon-status-u.patch
new file mode 100644
index 0000000..98eb61b
--- /dev/null
+++ b/0019-use-correct-name-enum-name-in-KF5.-fix-icon-status-u.patch
@@ -0,0 +1,40 @@
+From 58a9f1941a869455d03510e88289b8eff3e7ee77 Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt at gmail.com>
+Date: Fri, 23 Jan 2015 00:30:36 -0800
+Subject: [PATCH 19/25] use correct name enum name in KF5. fix icon status
+ update
+
+---
+ src/applet/qml/contents/ui/touchpad.qml | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/applet/qml/contents/ui/touchpad.qml b/src/applet/qml/contents/ui/touchpad.qml
+index 00f0f5d..8dec7c2 100644
+--- a/src/applet/qml/contents/ui/touchpad.qml
++++ b/src/applet/qml/contents/ui/touchpad.qml
+@@ -42,7 +42,7 @@ Item {
+ //Hide plasmoid from notification area after short delay
+ delayedStatusUpdate.restart()
+ } else {
+- plasmoid.status = ActiveStatus
++ plasmoid.status = PlasmaCore.Types.ActiveStatus
+ }
+
+ icon.elementId = data.enabled ? "touchpad_enabled"
+@@ -66,11 +66,11 @@ Item {
+ onTriggered: {
+ if (!hasTouchpad) {
+ //Setting this in Component.onCompleted didn't work
+- plasmoid.status = PassiveStatus
++ plasmoid.status = PlasmaCore.Types.PassiveStatus
+ return
+ }
+
+- plasmoid.status = enabled ? PassiveStatus : ActiveStatus
++ plasmoid.status = enabled ? PlasmaCore.Types.PassiveStatus : PlasmaCore.Types.ActiveStatus
+ }
+ }
+
+--
+1.9.3
+
diff --git a/0020-Global-shortcut-won-t-unregister-by-open-and-close-c.patch b/0020-Global-shortcut-won-t-unregister-by-open-and-close-c.patch
new file mode 100644
index 0000000..ff81354
--- /dev/null
+++ b/0020-Global-shortcut-won-t-unregister-by-open-and-close-c.patch
@@ -0,0 +1,86 @@
+From 7f894e6babac7f44794ee9cc1dcb150ad6e440af Mon Sep 17 00:00:00 2001
+From: Weng Xuetian <wengxt at gmail.com>
+Date: Sat, 24 Jan 2015 05:59:15 -0800
+Subject: [PATCH 20/25] Global shortcut won't unregister by open and close
+ configuration anymore.
+
+isConfigurationAction property is the magic to let KGlobalAccel know
+they are only for configuration purpose.
+
+REVIEW: 122233
+---
+ src/kcm/touchpadconfig.cpp | 2 +-
+ src/kded/kded.cpp | 2 +-
+ src/kded/kdedactions.cpp | 8 +++++---
+ src/kded/kdedactions.h | 2 +-
+ 4 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/src/kcm/touchpadconfig.cpp b/src/kcm/touchpadconfig.cpp
+index 75494c2..7460d45 100644
+--- a/src/kcm/touchpadconfig.cpp
++++ b/src/kcm/touchpadconfig.cpp
+@@ -203,7 +203,7 @@ TouchpadConfig::TouchpadConfig(QWidget *parent, const QVariantList &args)
+ SLOT(showConfigureNotificationsDialog()));
+ m_shortcutsDialog.reset(new KShortcutsDialog(KShortcutsEditor::GlobalAction,
+ KShortcutsEditor::LetterShortcutsDisallowed));
+- m_shortcutsDialog->addCollection(new TouchpadGlobalActions(this),
++ m_shortcutsDialog->addCollection(new TouchpadGlobalActions(true, this),
+ i18n("Enable/Disable Touchpad"));
+ connect(m_kded.configureShortcutsButton, SIGNAL(clicked()),
+ m_shortcutsDialog.data(), SLOT(show()));
+diff --git a/src/kded/kded.cpp b/src/kded/kded.cpp
+index 52389b6..409126b 100644
+--- a/src/kded/kded.cpp
++++ b/src/kded/kded.cpp
+@@ -218,7 +218,7 @@ bool TouchpadDisabler::isMousePluggedIn() const
+
+ void TouchpadDisabler::lateInit()
+ {
+- TouchpadGlobalActions *actions = new TouchpadGlobalActions(this);
++ TouchpadGlobalActions *actions = new TouchpadGlobalActions(false, this);
+ connect(actions, SIGNAL(enableTriggered()), SLOT(enable()));
+ connect(actions, SIGNAL(disableTriggered()), SLOT(disable()));
+ connect(actions, SIGNAL(toggleTriggered()), SLOT(toggle()));
+diff --git a/src/kded/kdedactions.cpp b/src/kded/kdedactions.cpp
+index d2abc9c..ca32834 100644
+--- a/src/kded/kdedactions.cpp
++++ b/src/kded/kdedactions.cpp
+@@ -24,7 +24,7 @@
+
+ #include "plugins.h"
+
+-TouchpadGlobalActions::TouchpadGlobalActions(QObject *parent)
++TouchpadGlobalActions::TouchpadGlobalActions(bool isConfiguration, QObject *parent)
+ : KActionCollection(parent)
+ {
+ //setComponentName(TouchpadPluginFactory::componentData());
+@@ -42,9 +42,11 @@ TouchpadGlobalActions::TouchpadGlobalActions(QObject *parent)
+ toggle->setText(i18n("Toggle Touchpad"));
+ connect(toggle, SIGNAL(triggered()), SIGNAL(toggleTriggered()));
+
+- Q_FOREACH (QAction *i, actions()) {
+- QAction *act = qobject_cast<QAction *>(i);
++ Q_FOREACH (QAction *act, actions()) {
+ KGlobalAccel::setGlobalShortcut(act,QKeySequence());
+ KActionCollection::setShortcutsConfigurable(act,true);
++ if (isConfiguration) {
++ act->setProperty("isConfigurationAction", true);
++ }
+ }
+ }
+diff --git a/src/kded/kdedactions.h b/src/kded/kdedactions.h
+index 200e466..fe67271 100644
+--- a/src/kded/kdedactions.h
++++ b/src/kded/kdedactions.h
+@@ -25,7 +25,7 @@ class TouchpadGlobalActions : public KActionCollection
+ {
+ Q_OBJECT
+ public:
+- explicit TouchpadGlobalActions(QObject *parent);
++ explicit TouchpadGlobalActions(bool isConfiguration, QObject *parent);
+
+ Q_SIGNALS:
+ void enableTriggered();
+--
+1.9.3
+
diff --git a/0022-Set-global-shortcuts-for-touchpad-enable-disable-tog.patch b/0022-Set-global-shortcuts-for-touchpad-enable-disable-tog.patch
new file mode 100644
index 0000000..c547d10
--- /dev/null
+++ b/0022-Set-global-shortcuts-for-touchpad-enable-disable-tog.patch
@@ -0,0 +1,52 @@
+From 91786b418e718639fd044a8f2feae80acd8eb267 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= <lukas at kde.org>
+Date: Fri, 30 Jan 2015 00:12:31 +0100
+Subject: [PATCH 22/25] Set global shortcuts for touchpad enable/disable/toggle
+
+Patch by: Rajeesh K Nambiar
+with minor modifications to let it compile :)
+
+REVIEW: 122319
+BUG: 342629
+---
+ src/kded/kdedactions.cpp | 14 +++++++++++++-
+ 1 file changed, 13 insertions(+), 1 deletion(-)
+
+diff --git a/src/kded/kdedactions.cpp b/src/kded/kdedactions.cpp
+index ca32834..790d588 100644
+--- a/src/kded/kdedactions.cpp
++++ b/src/kded/kdedactions.cpp
+@@ -33,17 +33,29 @@ TouchpadGlobalActions::TouchpadGlobalActions(bool isConfiguration, QObject *pare
+ QAction *enable = addAction("Enable Touchpad");
+ enable->setText(i18n("Enable Touchpad"));
+ connect(enable, SIGNAL(triggered()), SIGNAL(enableTriggered()));
++ bool okEnable = KGlobalAccel::setGlobalShortcut(enable, QKeySequence(Qt::Key_TouchpadOn));
++ if (!okEnable) {
++ qDebug() << "Couldn't set global shortcut to Qt::Key_TouchpadOn. There's another program using it, otherwise file a bug against kcm_touchpad";
++ }
+
+ QAction *disable = addAction("Disable Touchpad");
+ disable->setText(i18n("Disable Touchpad"));
+ connect(disable, SIGNAL(triggered()), SIGNAL(disableTriggered()));
++ bool okDisable = KGlobalAccel::setGlobalShortcut(disable, QKeySequence(Qt::Key_TouchpadOff));
++ if (!okDisable) {
++ qDebug() << "Couldn't set global shortcut to Qt::Key_TouchpadOff. There's another program using it, otherwise file a bug against kcm_touchpad";
++ }
+
+ QAction *toggle = addAction("Toggle Touchpad");
+ toggle->setText(i18n("Toggle Touchpad"));
+ connect(toggle, SIGNAL(triggered()), SIGNAL(toggleTriggered()));
++ bool okToggle = KGlobalAccel::setGlobalShortcut(toggle, QKeySequence(Qt::Key_TouchpadToggle));
++ if (!okToggle) {
++ qDebug() << "Couldn't set global shortcut to Qt::Key_TouchpadToggle. There's another program using it, otherwise file a bug against kcm_touchpad";
++ }
+
+ Q_FOREACH (QAction *act, actions()) {
+- KGlobalAccel::setGlobalShortcut(act,QKeySequence());
++ //KGlobalAccel::setGlobalShortcut(act,QKeySequence());
+ KActionCollection::setShortcutsConfigurable(act,true);
+ if (isConfiguration) {
+ act->setProperty("isConfigurationAction", true);
+--
+1.9.3
+
diff --git a/0023-Fix-build.patch b/0023-Fix-build.patch
new file mode 100644
index 0000000..7afa0cb
--- /dev/null
+++ b/0023-Fix-build.patch
@@ -0,0 +1,25 @@
+From 36f4ac399ef4082515e26b2923e00eee2b3705f0 Mon Sep 17 00:00:00 2001
+From: Hrvoje Senjan <hrvoje.senjan at gmail.com>
+Date: Fri, 30 Jan 2015 19:10:35 +0100
+Subject: [PATCH 23/25] Fix build
+
+add missing include
+---
+ src/kded/kdedactions.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/kded/kdedactions.cpp b/src/kded/kdedactions.cpp
+index 790d588..a3b2477 100644
+--- a/src/kded/kdedactions.cpp
++++ b/src/kded/kdedactions.cpp
+@@ -19,6 +19,7 @@
+ #include "kdedactions.h"
+
+ #include <QAction>
++#include <QDebug>
+ #include <KLocalizedString>
+ #include <KGlobalAccel>
+
+--
+1.9.3
+
diff --git a/0025-Add-libinput-support-to-touchpad-kcm.patch b/0025-Add-libinput-support-to-touchpad-kcm.patch
new file mode 100644
index 0000000..3ac1c2f
--- /dev/null
+++ b/0025-Add-libinput-support-to-touchpad-kcm.patch
@@ -0,0 +1,510 @@
+From 3c12549823a4b75e73775d1444d6c8eb2f0e4ff2 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Thu, 12 Feb 2015 19:27:08 +0100
+Subject: [PATCH 25/25] Add libinput support to touchpad kcm.
+
+libinput is a library to handle input devices in Wayland compositors
+and to provide a generic X.Org input driver.
+
+The patch is authored by Peter Hutterer, libinput maintainer.
+
+REVIEW: 122331
+CCMAIL: peter.hutterer at who-t.net
+---
+ src/backends/x11.cmake | 1 +
+ src/backends/x11/synclientproperties.h | 1 +
+ src/backends/x11/xlibbackend.cpp | 177 ++++++++++++++++++++++++---------
+ src/backends/x11/xlibbackend.h | 14 ++-
+ src/kcm/customconfigdialogmanager.cpp | 7 +-
+ src/kcm/touchpad.kcfg | 5 +
+ src/kcm/ui/tap.ui | 33 +++---
+ src/touchpadbackend.cpp | 2 +-
+ 8 files changed, 172 insertions(+), 68 deletions(-)
+
+diff --git a/src/backends/x11.cmake b/src/backends/x11.cmake
+index f208281..3496333 100644
+--- a/src/backends/x11.cmake
++++ b/src/backends/x11.cmake
+@@ -24,6 +24,7 @@ add_definitions(${X11_XCB_DEFINITIONS} ${XCB_DEFINITIONS})
+ SET(backend_SRCS
+ ${backend_SRCS}
+ backends/x11/synclientproperties.c
++ backends/x11/libinputproperties.c
+ backends/x11/xcbatom.cpp
+ backends/x11/xlibbackend.cpp
+ backends/x11/xlibnotifications.cpp
+diff --git a/src/backends/x11/synclientproperties.h b/src/backends/x11/synclientproperties.h
+index 5b32b9f..43d18d2 100644
+--- a/src/backends/x11/synclientproperties.h
++++ b/src/backends/x11/synclientproperties.h
+@@ -66,5 +66,6 @@ struct Parameter {
+ };
+
+ extern const struct Parameter synapticsProperties[];
++extern const struct Parameter libinputProperties[];
+
+ #endif
+diff --git a/src/backends/x11/xlibbackend.cpp b/src/backends/x11/xlibbackend.cpp
+index 3b5e5be..2acb162 100644
+--- a/src/backends/x11/xlibbackend.cpp
++++ b/src/backends/x11/xlibbackend.cpp
+@@ -135,61 +135,36 @@ struct PropertyInfo
+ }
+ };
+
+-XlibBackend::~XlibBackend()
++class XlibSynapticsBackend : public XlibBackend
+ {
+-}
++public:
++ XlibSynapticsBackend(QObject *parent = 0);
++};
+
+-XlibBackend::XlibBackend(QObject *parent) :
+- TouchpadBackend(parent),
+- m_display(XOpenDisplay(0)), m_connection(0),
+- m_resX(1), m_resY(1)
++class XlibLibinputBackend : public XlibBackend
+ {
+- if (m_display) {
+- m_connection = XGetXCBConnection(m_display.data());
+- }
+-
+- if (!m_connection) {
+- m_errorString = i18n("Cannot connect to X server");
+- return;
+- }
++public:
++ XlibLibinputBackend(QObject *parent = 0);
++};
+
+- m_floatType.intern(m_connection, "FLOAT");
++XlibSynapticsBackend::XlibSynapticsBackend(QObject *parent) :
++ XlibBackend(parent)
++{
+ m_capsAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES);
+- m_enabledAtom.intern(m_connection, XI_PROP_ENABLED);
+- m_touchpadOffAtom.intern(m_connection, SYNAPTICS_PROP_OFF);
+- m_mouseAtom.intern(m_connection, XI_MOUSE);
+- m_keyboardAtom.intern(m_connection, XI_KEYBOARD);
+- XcbAtom resolutionAtom(m_connection, SYNAPTICS_PROP_RESOLUTION);
+- XcbAtom edgesAtom(m_connection, SYNAPTICS_PROP_EDGES);
+-
+- for (const Parameter *param = synapticsProperties; param->name; param++) {
+- QLatin1String name(param->prop_name);
+-
+- if (!m_atoms.contains(name)) {
+- m_atoms.insert(name, QSharedPointer<XcbAtom>(
+- new XcbAtom(m_connection, param->prop_name)));
+- }
+- }
+-
+- if (!m_capsAtom.atom()) {
+- m_errorString =
+- i18n("Synaptics driver is not installed (or is not used)");
++ if (!m_capsAtom.atom())
+ return;
+- }
+
+- m_device = findTouchpad();
++ m_device = findTouchpad(m_capsAtom);
+ if (m_device == XIAllDevices) {
+ m_errorString = i18n("No touchpad found");
+ return;
+ }
+
+- for (const Parameter *p = synapticsProperties; p->name; p++) {
+- if (getParameter(p).isValid()) {
+- m_supported.append(p->name);
+- }
+- }
++ m_touchpadOffAtom.intern(m_connection, SYNAPTICS_PROP_OFF);
++ XcbAtom resolutionAtom(m_connection, SYNAPTICS_PROP_RESOLUTION);
++ XcbAtom edgesAtom(m_connection, SYNAPTICS_PROP_EDGES);
+
+- if (m_supported.isEmpty()) {
++ if (!loadSupportedProperties(synapticsProperties)) {
+ m_errorString = i18n("Cannot read any of touchpad's properties");
+ return;
+ }
+@@ -288,9 +263,97 @@ XlibBackend::XlibBackend(QObject *parent) :
+ m_supported.removeAll(i.value());
+ }
+ }
++
++ m_identifierAtom.intern(m_connection, SYNAPTICS_PROP_CAPABILITIES);
++ m_paramList = synapticsProperties;
++}
++
++XlibLibinputBackend::XlibLibinputBackend(QObject *parent) :
++ XlibBackend(parent)
++{
++ XcbAtom identifier(m_connection,
++ "libinput Tapping Enabled",
++ true);
++
++ if (!identifier.atom())
++ return;
++
++ m_device = findTouchpad(identifier);
++ if (m_device == XIAllDevices) {
++ m_errorString = i18n("No touchpad found");
++ return;
++ }
++
++ m_identifierAtom.intern(m_connection,
++ "libinput Send Events Modes Available");
++
++ if (!loadSupportedProperties(libinputProperties)) {
++ m_errorString = i18n("Cannot read any of touchpad's properties");
++ return;
++ }
++
++ /* FIXME: has a different format than Synaptics Off but we don't expose
++ the toggle so this is just to stop it from crashing when we check
++ m_touchpadOffAtom */
++ m_touchpadOffAtom.intern(m_connection,
++ "libinput Send Events Mode enabled");
++
++
++ XcbAtom scroll_methods(m_connection,
++ "libinput Scroll Methods Available",
++ true);
++ if (scroll_methods.atom() != 0) {
++ PropertyInfo methods(m_display.data(),
++ m_device,
++ scroll_methods.atom(),
++ 0);
++ if (!methods.value(0).toInt())
++ m_supported.removeAll("VertTwoFingerScroll");
++ else if (!methods.value(1).toInt())
++ m_supported.removeAll("VertEdgeScroll");
++ }
++
++ m_paramList = libinputProperties;
+ }
+
+-int XlibBackend::findTouchpad()
++XlibBackend* XlibBackend::initialize(QObject *parent)
++{
++ QScopedPointer<Display, XDisplayCleanup> 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);
++}
++
++XlibBackend::~XlibBackend()
++{
++}
++
++XlibBackend::XlibBackend(QObject *parent) :
++ TouchpadBackend(parent),
++ m_display(XOpenDisplay(0)), m_connection(0),
++ m_resX(1), m_resY(1)
++{
++ if (m_display) {
++ m_connection = XGetXCBConnection(m_display.data());
++ }
++
++ if (!m_connection) {
++ m_errorString = i18n("Cannot connect to X server");
++ return;
++ }
++
++ m_floatType.intern(m_connection, "FLOAT");
++ m_mouseAtom.intern(m_connection, XI_MOUSE);
++ m_keyboardAtom.intern(m_connection, XI_KEYBOARD);
++ m_enabledAtom.intern(m_connection, XI_PROP_ENABLED);
++}
++
++int XlibBackend::findTouchpad(XcbAtom &identifier)
+ {
+ int nDevices = 0;
+ QSharedPointer<XIDeviceInfo> deviceInfo(
+@@ -306,7 +369,7 @@ int XlibBackend::findTouchpad()
+ &nProperties), XDeleter);
+
+ if (std::count(properties.data(), properties.data() + nProperties,
+- m_capsAtom.atom()))
++ identifier.atom()))
+ {
+ return info->deviceid;
+ }
+@@ -315,9 +378,9 @@ int XlibBackend::findTouchpad()
+ return XIAllDevices;
+ }
+
+-static const Parameter *findParameter(const QString &name)
++const Parameter * XlibBackend::findParameter(const QString &name)
+ {
+- for (const Parameter *par = synapticsProperties; par->name; par++) {
++ for (const Parameter *par = m_paramList; par->name; par++) {
+ if (name == par->name) {
+ return par;
+ }
+@@ -325,6 +388,26 @@ static const Parameter *findParameter(const QString &name)
+ return 0;
+ }
+
++bool XlibBackend::loadSupportedProperties(const Parameter *props)
++{
++ for (const Parameter *param = props; param->name; param++) {
++ QLatin1String name(param->prop_name);
++
++ if (!m_atoms.contains(name)) {
++ m_atoms.insert(name, QSharedPointer<XcbAtom>(
++ new XcbAtom(m_connection, param->prop_name)));
++ }
++ }
++
++ for (const Parameter *p = props; p->name; p++) {
++ if (getParameter(p).isValid()) {
++ m_supported.append(p->name);
++ }
++ }
++
++ return !m_supported.isEmpty();
++}
++
+ double XlibBackend::getPropertyScale(const QString &name) const
+ {
+ if (m_scaleByResX.contains(name) && m_scaleByResY.contains(name)) {
+@@ -611,7 +694,7 @@ void XlibBackend::touchpadDetached()
+ void XlibBackend::devicePlugged(int device)
+ {
+ if (m_device == XIAllDevices) {
+- m_device = findTouchpad();
++ m_device = findTouchpad(m_identifierAtom);
+ if (m_device != XIAllDevices) {
+ qWarning() << "Touchpad reset";
+ m_notifications.reset();
+diff --git a/src/backends/x11/xlibbackend.h b/src/backends/x11/xlibbackend.h
+index 3692a60..7cecb4a 100644
+--- a/src/backends/x11/xlibbackend.h
++++ b/src/backends/x11/xlibbackend.h
+@@ -28,6 +28,7 @@
+ #include <QX11Info>
+
+ #include "touchpadbackend.h"
++#include "synclientproperties.h"
+
+ #include <xcb/xcb.h>
+
+@@ -41,7 +42,7 @@ class XlibBackend : public TouchpadBackend
+ Q_OBJECT
+
+ public:
+- explicit XlibBackend(QObject *parent = 0);
++ static XlibBackend* initialize(QObject *parent = 0);
+ ~XlibBackend();
+
+ bool applyConfig(const QVariantHash &);
+@@ -64,7 +65,8 @@ private slots:
+ void touchpadDetached();
+ void devicePlugged(int);
+
+-private:
++protected:
++ explicit XlibBackend(QObject *parent);
+ struct PropertyInfo *getDevProperty(const QLatin1String &propName);
+ bool setParameter(const struct Parameter *, const QVariant &);
+ QVariant getParameter(const struct Parameter *);
+@@ -78,12 +80,16 @@ private:
+ QScopedPointer<Display, XDisplayCleanup> m_display;
+ xcb_connection_t *m_connection;
+
+- XcbAtom m_floatType, m_capsAtom, m_enabledAtom, m_touchpadOffAtom,
++ XcbAtom m_floatType, m_capsAtom, m_identifierAtom, m_enabledAtom, m_touchpadOffAtom,
+ m_mouseAtom, m_keyboardAtom;
+
+- int findTouchpad();
++ int findTouchpad(XcbAtom &identifier);
+ int m_device;
+
++ const struct Parameter *m_paramList;
++ const Parameter *findParameter(const QString &name);
++ bool loadSupportedProperties(const struct Parameter *props);
++
+ QMap<QLatin1String, QSharedPointer<XcbAtom> > m_atoms;
+ QMap<QLatin1String, struct PropertyInfo> m_props;
+ QSet<QLatin1String> m_changed;
+diff --git a/src/kcm/customconfigdialogmanager.cpp b/src/kcm/customconfigdialogmanager.cpp
+index 75b03ab..434fd4b 100644
+--- a/src/kcm/customconfigdialogmanager.cpp
++++ b/src/kcm/customconfigdialogmanager.cpp
+@@ -21,6 +21,7 @@
+ #include <cmath>
+
+ #include <QWidget>
++#include <QGroupBox>
+
+ #include <KConfigSkeleton>
+ #include <KComboBox>
+@@ -44,7 +45,11 @@ CustomConfigDialogManager::CustomConfigDialogManager(QWidget *parent,
+ }
+ m_widgets[name] = child;
+
+- if (!supported.contains(name)) {
++ /* FIXME: this should probably be less hackish */
++ if (name == "Tapping" &&
++ !supported.contains("Tapping"))
++ qobject_cast<QGroupBox *>(child)->setCheckable(false);
++ else if (!supported.contains(name)) {
+ child->setEnabled(false);
+ }
+
+diff --git a/src/kcm/touchpad.kcfg b/src/kcm/touchpad.kcfg
+index 2afe642..d4d127c 100644
+--- a/src/kcm/touchpad.kcfg
++++ b/src/kcm/touchpad.kcfg
+@@ -5,6 +5,11 @@
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd">
+ <kcfgfile name="touchpadrc"/>
+ <group name="parameters">
++ <entry name="Tapping" type="Bool">
++ <default code="true">
++ systemDefault("Tapping", true)
++ </default>
++ </entry>
+ <entry name="$(TapAction)Button" type="Enum">
+ <parameter name="TapAction" type="Enum">
+ <values>
+diff --git a/src/kcm/ui/tap.ui b/src/kcm/ui/tap.ui
+index 8e081ad..389db5e 100644
+--- a/src/kcm/ui/tap.ui
++++ b/src/kcm/ui/tap.ui
+@@ -17,7 +17,7 @@
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+- <widget class="QGroupBox" name="groupBox">
++ <widget class="QGroupBox" name="kcfg_Tapping">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+@@ -30,6 +30,9 @@
+ <property name="flat">
+ <bool>true</bool>
+ </property>
++ <property name="checkable">
++ <bool>true</bool>
++ </property>
+ <layout class="QFormLayout" name="formLayout_3">
+ <property name="formAlignment">
+ <set>Qt::AlignHCenter|Qt::AlignTop</set>
+@@ -290,7 +293,7 @@
+ <property name="toolTip">
+ <string>How long it takes (in milliseconds) for the "Locked Drags" mode to be automatically turned off after the finger is released from the touchpad</string>
+ </property>
+- <property name="minimum">
++ <property name="minimum" stdset="0">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+@@ -299,7 +302,7 @@
+ <property name="singleStep">
+ <number>99</number>
+ </property>
+- <property name="suffix">
++ <property name="suffix" stdset="0">
+ <string> ms</string>
+ </property>
+ </widget>
+@@ -385,16 +388,16 @@
+ <property name="toolTip">
+ <string>Maximum time (in milliseconds) for detecting a tap</string>
+ </property>
+- <property name="minimum">
++ <property name="minimum" stdset="0">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>99</number>
+ </property>
+- <property name="singleStep">
++ <property name="singleStep" stdset="0">
+ <number>10</number>
+ </property>
+- <property name="suffix">
++ <property name="suffix" stdset="0">
+ <string> ms</string>
+ </property>
+ </widget>
+@@ -404,13 +407,13 @@
+ <property name="toolTip">
+ <string>Maximum movement of the finger for detecting a tap</string>
+ </property>
+- <property name="singleStep">
++ <property name="singleStep" stdset="0">
+ <double>0.100000000000000</double>
+ </property>
+- <property name="suffix">
++ <property name="suffix" stdset="0">
+ <string> mm</string>
+ </property>
+- <property name="decimals">
++ <property name="decimals" stdset="0">
+ <number>1</number>
+ </property>
+ </widget>
+@@ -420,16 +423,16 @@
+ <property name="toolTip">
+ <string>Maximum time (in milliseconds) for detecting a double tap</string>
+ </property>
+- <property name="minimum">
++ <property name="minimum" stdset="0">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>99</number>
+ </property>
+- <property name="singleStep">
++ <property name="singleStep" stdset="0">
+ <number>10</number>
+ </property>
+- <property name="suffix">
++ <property name="suffix" stdset="0">
+ <string> ms</string>
+ </property>
+ </widget>
+@@ -439,16 +442,16 @@
+ <property name="toolTip">
+ <string>Timeout after a tap to recognize it as a single tap</string>
+ </property>
+- <property name="minimum">
++ <property name="minimum" stdset="0">
+ <number>0</number>
+ </property>
+ <property name="maximum">
+ <number>99</number>
+ </property>
+- <property name="singleStep">
++ <property name="singleStep" stdset="0">
+ <number>10</number>
+ </property>
+- <property name="suffix">
++ <property name="suffix" stdset="0">
+ <string> ms</string>
+ </property>
+ </widget>
+diff --git a/src/touchpadbackend.cpp b/src/touchpadbackend.cpp
+index 93e3dc2..8dd1f24 100644
+--- a/src/touchpadbackend.cpp
++++ b/src/touchpadbackend.cpp
+@@ -32,7 +32,7 @@ TouchpadBackend *TouchpadBackend::implementation()
+ //There will be multiple backends later
+ static QThreadStorage<QSharedPointer<XlibBackend> > backend;
+ if (!backend.hasLocalData()) {
+- backend.setLocalData(QSharedPointer<XlibBackend>(new XlibBackend()));
++ backend.setLocalData(QSharedPointer<XlibBackend>(XlibBackend::initialize()));
+ }
+ return backend.localData().data();
+ }
+--
+1.9.3
+
diff --git a/0026-add-missing-libinputproperties.c.patch b/0026-add-missing-libinputproperties.c.patch
new file mode 100644
index 0000000..7a4019e
--- /dev/null
+++ b/0026-add-missing-libinputproperties.c.patch
@@ -0,0 +1,56 @@
+From e267c5fd548198b4cbc064168191c13777ea54d0 Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter at math.unl.edu>
+Date: Thu, 12 Feb 2015 13:27:52 -0600
+Subject: [PATCH 26/26] add missing libinputproperties.c
+
+Missing part of...
+REVIEW: 122331
+---
+ src/backends/x11/libinputproperties.c | 35 +++++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+ create mode 100644 src/backends/x11/libinputproperties.c
+
+diff --git a/src/backends/x11/libinputproperties.c b/src/backends/x11/libinputproperties.c
+new file mode 100644
+index 0000000..9dbf9ea
+--- /dev/null
++++ b/src/backends/x11/libinputproperties.c
+@@ -0,0 +1,35 @@
++/*
++ * Copyright (C) 2015 Red Hat, Inc.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++ */
++
++#include "synclientproperties.h"
++
++#include <stddef.h>
++#include <limits.h>
++
++const struct Parameter libinputProperties[] = {
++ /* This is a boolean for all three fingers, no per-finger config */
++ {"Tapping", PT_INT, 0, 1, "libinput Tapping Enabled", 8, 0},
++ /* libinput normalizes the accel to -1/1 */
++ {"AccelFactor", PT_DOUBLE, -1.0, 1.0, "libinput Accel Speed", 0 /*float */, 0},
++ /* Only one of these may be set at one time */
++ {"VertEdgeScroll", PT_INT, 0, 1, "libinput Scroll Method Enabled", 8, 1},
++ {"VertTwoFingerScroll", PT_INT, 0, 1, "libinput Scroll Method Enabled", 8, 0},
++ {"InvertVertScroll", PT_INT, 0, 1, "libinput Natural Scrolling Enabled", 8, 0},
++ /* libinput doesn't have a separate toggle for horiz scrolling */
++ { NULL, 0, 0, 0, 0, 0, 0 }
++};
+--
+1.9.3
+
diff --git a/kcm_touchpad.spec b/kcm_touchpad.spec
index da0ac48..05d9e25 100644
--- a/kcm_touchpad.spec
+++ b/kcm_touchpad.spec
@@ -1,39 +1,82 @@
-
Name: kcm_touchpad
Summary: KDE Systemsettings module for touchpads
-Version: 1.1
-Release: 3%{?dist}
+Version: 5.1.95
+Release: 1%{?dist}
License: GPLv2+
Url: https://projects.kde.org/kcm-touchpad
-
-# use releaseme script to generate tarball, and host ourselves
-# at least until we can poke/bribe upstream into doing so
-Source0: http://rdieter.fedorapeople.org/kcm-touchpad/kcm-touchpad-%{version}.tar.xz
-
-BuildRequires: gettext
-BuildRequires: kdelibs4-devel
-BuildRequires: pkgconfig(x11-xcb)
-BuildRequires: pkgconfig(xcb-record)
-BuildRequires: pkgconfig(xorg-server)
-BuildRequires: pkgconfig(xorg-synaptics)
-
-# kcmshell4
-Requires: kde-runtime%{?_kde4_version: >= %{_kde4_version}}
+%global revision %(echo %{version} | cut -d. -f3)
+%if %{revision} >= 50
+%global stable unstable
+%else
+%global stable stable
+%endif
+Source0: http://download.kde.org/%{stable}/plasma/%{version}/kcm-touchpad-%{version}.tar.xz
+
+## upstream patches
+BuildRequires: git-core
+# master/ branch commits post v5.1.95 tag
+Patch0009: 0009-fix-initializing-the-dataengine.patch
+Patch0010: 0010-properly-extract-from-UI-files.patch
+Patch0011: 0011-fix-notifications.patch
+Patch0012: 0012-Update-X-KDE-PluginInfo-EnabledByDefault-true-to-mat.patch
+Patch0017: 0017-load-the-translation-catalog-correctly.patch
+Patch0019: 0019-use-correct-name-enum-name-in-KF5.-fix-icon-status-u.patch
+Patch0020: 0020-Global-shortcut-won-t-unregister-by-open-and-close-c.patch
+Patch0022: 0022-Set-global-shortcuts-for-touchpad-enable-disable-tog.patch
+Patch0023: 0023-Fix-build.patch
+Patch0025: 0025-Add-libinput-support-to-touchpad-kcm.patch
+Patch0026: 0026-add-missing-libinputproperties.c.patch
+
+BuildRequires: extra-cmake-modules
+BuildRequires: kf5-rpm-macros
+BuildRequires: qt5-qtbase-devel
+BuildRequires: qt5-qtx11extras-devel
+
+BuildRequires: kf5-kded-devel
+BuildRequires: kf5-kinit-devel
+BuildRequires: kf5-kcmutils-devel
+BuildRequires: kf5-kcoreaddons-devel
+BuildRequires: kf5-kdbusaddons-devel
+BuildRequires: kf5-kcompletion-devel
+BuildRequires: kf5-kwidgetsaddons-devel
+BuildRequires: kf5-ki18n-devel
+BuildRequires: kf5-kservice-devel
+BuildRequires: kf5-knotifyconfig-devel
+BuildRequires: kf5-kxmlgui-devel
+BuildRequires: kf5-knotifications-devel
+BuildRequires: kf5-kglobalaccel-devel
+BuildRequires: kf5-plasma-devel
+
+BuildRequires: pkgconfig
+BuildRequires: libxcb-devel
+BuildRequires: libX11-devel
+BuildRequires: libXi-devel
+BuildRequires: xcb-util-devel
+BuildRequires: xcb-util-cursor-devel
+BuildRequires: xcb-util-wm-devel
+BuildRequires: xcb-util-image-devel
+BuildRequires: xcb-util-keysyms-devel
+BuildRequires: xcb-util-renderutil-devel
+BuildRequires: xorg-x11-proto-devel
+BuildRequires: xorg-x11-drv-synaptics-devel
+BuildRequires: xorg-x11-server-devel
+
+Requires: kf5-filesystem
%description
%{summary}.
%prep
-%setup -q -n kcm-touchpad-%{version}
+%autosetup -n kcm-touchpad-%{version} -p1
%build
-mkdir -p %{_target_platform}
+mkdir %{_target_platform}
pushd %{_target_platform}
-%{cmake_kde4} ..
+%{cmake_kf5} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
@@ -42,44 +85,47 @@ make %{?_smp_mflags} -C %{_target_platform}
%install
make install/fast DESTDIR=%{buildroot} -C %{_target_platform}
-%find_lang kcm_touchpad
-%find_lang plasma_applet_touchpad
-cat *.lang > all.lang
-
%post
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
%posttrans
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
%postun
if [ $1 -eq 0 ] ; then
-touch --no-create %{_kde4_iconsdir}/hicolor &> /dev/null || :
-gtk-update-icon-cache %{_kde4_iconsdir}/hicolor &> /dev/null || :
+touch --no-create %{_datadir}/icons/hicolor &> /dev/null || :
+gtk-update-icon-cache %{_datadir}/icons/hicolor &> /dev/null || :
fi
-
-%files -f all.lang
+%files
%doc COPYING
-%{_kde4_bindir}/kcm-touchpad-list-devices
-%{_kde4_libdir}/kde4/kded_touchpad.so
-%{_kde4_libdir}/kde4/plasma_engine_touchpad.so
-%{_kde4_datadir}/config.kcfg/touchpad.kcfg
-%{_kde4_datadir}/config.kcfg/touchpaddaemon.kcfg
+%{_bindir}/kcm-touchpad-list-devices
+%{_qt5_plugindir}/kded_touchpad.so
+%{_qt5_plugindir}/plasma/dataengine/plasma_engine_touchpad.so
+%{_datadir}/config.kcfg/touchpad.kcfg
+%{_datadir}/config.kcfg/touchpaddaemon.kcfg
%{_datadir}/dbus-1/interfaces/org.kde.touchpad.xml
-%{_kde4_iconsdir}/hicolor/*/*/*
-%{_kde4_appsdir}/desktoptheme/default/icons/touchpad.svg
-%{_kde4_appsdir}/kcm_touchpad/kcm_touchpad.notifyrc
-%{_kde4_appsdir}/plasma/plasmoids/touchpad/
-%{_kde4_appsdir}/plasma/services/touchpad.operations
-%{_kde4_datadir}/kde4/services/kcm_touchpad.desktop
-%{_kde4_datadir}/kde4/services/kded/touchpad.desktop
-%{_kde4_datadir}/kde4/services/plasma-applet-touchpad.desktop
-%{_kde4_datadir}/kde4/services/plasma-dataengine-touchpad.desktop
+%{_datadir}/icons/hicolor/*/*/*
+%{_kf5_datadir}/knotifications5/kcm_touchpad.notifyrc
+%{_kf5_datadir}/kservices5/*.desktop
+%{_kf5_datadir}/kservices5/kded/touchpad.desktop
+%{_kf5_datadir}/plasma/desktoptheme/default/icons/touchpad.svg
+%{_kf5_datadir}/plasma/plasmoids/touchpad
+%{_kf5_datadir}/plasma/services/touchpad.operations
%changelog
+* Thu Feb 12 2015 Rex Dieter <rdieter at fedoraproject.org> - 5.1.95-1
+- Plasma 5.1.95
+- plus post-5.1.95 commits, including new libinput support
+
+* Wed Dec 17 2014 Daniel Vrátil <dvratil at redhat.com> - 5.1.2-1
+- Plasma 5.1.2
+
+* Fri Nov 07 2014 Daniel Vrátil <dvratil at redhat.com> - 5.1.1-1
+- Plasma 5.1.1
+
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
@@ -97,4 +143,3 @@ fi
* Wed Dec 04 2013 Rex Dieter <rdieter at fedoraproject.org> 0-1.20131204
- first try, 20131204 git snapshot
-
diff --git a/sources b/sources
index c3ec7f5..44f9695 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-0dfd6ff7725f443a13ff477386a47238 kcm-touchpad-1.1.tar.xz
+25f22612196f820dafe395cdf2fdf0a8 kcm-touchpad-5.1.95.tar.xz
More information about the scm-commits
mailing list