From 7ab2ba98e1842483a72d46dbb17e9348767d8297 Mon Sep 17 00:00:00 2001 From: Bart Ribbers Date: Fri, 17 Sep 2021 16:41:02 +0200 Subject: testing/wacomtablet: move from community This reverts commit fe5fa7fb7af2ebcb8713804a317aaaa8ca710609. It depends on xf86-input-wacom which is in testing still --- testing/wacomtablet/0001-qt-5.15.patch | 24 +++ ...ault-and-warn-when-turning-it-on-manually.patch | 240 +++++++++++++++++++++ testing/wacomtablet/APKBUILD | 59 +++++ 3 files changed, 323 insertions(+) create mode 100644 testing/wacomtablet/0001-qt-5.15.patch create mode 100644 testing/wacomtablet/0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch create mode 100644 testing/wacomtablet/APKBUILD (limited to 'testing/wacomtablet') diff --git a/testing/wacomtablet/0001-qt-5.15.patch b/testing/wacomtablet/0001-qt-5.15.patch new file mode 100644 index 00000000000..572450b0b11 --- /dev/null +++ b/testing/wacomtablet/0001-qt-5.15.patch @@ -0,0 +1,24 @@ +From 4f73ff02b3efd5e8728b18fcf1067eca166704ee Mon Sep 17 00:00:00 2001 +From: Christophe Giboudeaux +Date: Thu, 4 Jun 2020 16:00:38 +0200 +Subject: Fix build with Qt 5.15 + +--- + src/kcmodule/pressurecurvewidget.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/kcmodule/pressurecurvewidget.cpp b/src/kcmodule/pressurecurvewidget.cpp +index 0c943b3..f047a6c 100644 +--- a/src/kcmodule/pressurecurvewidget.cpp ++++ b/src/kcmodule/pressurecurvewidget.cpp +@@ -22,6 +22,7 @@ + //Qt includes + #include + #include ++#include + #include + #include + #include +-- +cgit v1.1 + diff --git a/testing/wacomtablet/0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch b/testing/wacomtablet/0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch new file mode 100644 index 00000000000..f738eecc12c --- /dev/null +++ b/testing/wacomtablet/0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch @@ -0,0 +1,240 @@ +From 8f4660611f435aea860072d741cf506262f56347 Mon Sep 17 00:00:00 2001 +From: Nate Graham +Date: Tue, 3 Aug 2021 09:44:05 -0600 +Subject: [PATCH 1/3] Turn off gesture support by default and warn when turning + it on manually + +Gesture support has been disabled by default upstream to work around an +inherent incompatibility with Wacom-provided gestures and touch support +in Qt; see https://bugreports.qt.io/browse/QTBUG-84756. + +However the KCM still has it on by default, and its KDED module +propagates that change to effectively turn gestore support on +automatically. This results in touchscreen touch being broken for all +Qt software by default when this repo is installed. + +This commit turns gesture support off by default to match the new +upstream setting and prevent broken touch support in Qt software, and +also shows a warning message about this if the user turns it on +manually. + +BUG: 440556 +FIXED-IN: 5.23 +--- + src/common/deviceprofiledefaults.cpp | 2 +- + src/kcmodule/touchpagewidget.cpp | 23 ++++++++++++++++++++++- + src/kcmodule/touchpagewidget.ui | 26 ++++++++++++++++++++++++++ + 3 files changed, 49 insertions(+), 2 deletions(-) + +diff --git a/src/common/deviceprofiledefaults.cpp b/src/common/deviceprofiledefaults.cpp +index 1425b1c..066c3cb 100644 +--- a/src/common/deviceprofiledefaults.cpp ++++ b/src/common/deviceprofiledefaults.cpp +@@ -44,7 +44,7 @@ void setupDefaultStylus(DeviceProfile &stylus) { + } + + void setupDefaultTouch(DeviceProfile &touch) { +- touch.setProperty(Property::Gesture, QLatin1String("on")); ++ touch.setProperty(Property::Gesture, QLatin1String("off")); + touch.setProperty(Property::InvertScroll, QLatin1String("off")); + touch.setProperty(Property::Mode, QLatin1String("absolute")); + touch.setProperty(Property::Rotate, ScreenRotation::AUTO.key()); +diff --git a/src/kcmodule/touchpagewidget.cpp b/src/kcmodule/touchpagewidget.cpp +index ffe748b..f2facb0 100644 +--- a/src/kcmodule/touchpagewidget.cpp ++++ b/src/kcmodule/touchpagewidget.cpp +@@ -28,6 +28,7 @@ + #include "tabletareaselectiondialog.h" + #include "x11wacom.h" + ++#include + #include + #include + +@@ -115,6 +116,12 @@ void TouchPageWidget::saveToProfile(ProfileManagementInterface &profileManagemen + + void TouchPageWidget::onGesturesModeChanged(int state) + { ++ if (state == 0) { ++ ui->gesturesWarning->animatedHide(); ++ } else { ++ ui->gesturesWarning->animatedShow(); ++ } ++ + setGesturesSupportEnabled(state == Qt::Checked); + onProfileChanged(); + } +@@ -148,11 +155,18 @@ void TouchPageWidget::onTabletMappingClicked() + + void TouchPageWidget::onTouchModeChanged(int state) + { ++ // Show/hide the gestures warning as needed, since its UI gets enabled and ++ // disabled dynamically when touch is turned on or off ++ if (state == 0) { ++ ui->gesturesWarning->animatedHide(); ++ } else if (ui->gesturesCheckBox->isChecked()) { ++ ui->gesturesWarning->animatedShow(); ++ } ++ + setTouchSupportEnabled(state == Qt::Checked); + onProfileChanged(); + } + +- + void TouchPageWidget::onTrackingModeAbsolute(bool activated) + { + if (!activated) { +@@ -387,4 +401,11 @@ void TouchPageWidget::setupUi() + ui->trackingWarningIcon->setPixmap(QIcon::fromTheme(QLatin1String("dialog-warning")).pixmap(QSize(16,16))); + ui->trackingWarningIcon->setVisible(false); + ui->trackingWarningLabel->setVisible(false); ++ ++ // Set this here instead of in the UI file because the string property in ++ // the UI file will strip out HTML tags and break our link ++ const QString bugReportURL = QStringLiteral("https://bugreports.qt.io/browse/QTBUG-84756"); ++ ui->gesturesWarning->setText(i18n("Enabling gestures here is known to break touch input using a touchscreen. See %2 for details.", bugReportURL, bugReportURL)); ++ // Open the link when the user clicks on it ++ connect(ui->gesturesWarning, &KMessageWidget::linkActivated, this, [](const QString &str) { QDesktopServices::openUrl(QUrl(str)); } ); + } +diff --git a/src/kcmodule/touchpagewidget.ui b/src/kcmodule/touchpagewidget.ui +index 9b5f8df..19d9537 100644 +--- a/src/kcmodule/touchpagewidget.ui ++++ b/src/kcmodule/touchpagewidget.ui +@@ -11,6 +11,24 @@ + + + ++ ++ ++ ++ false ++ ++ ++ false ++ ++ ++ ++ true ++ ++ ++ KMessageWidget::Warning ++ ++ ++ + + + +@@ -362,6 +380,14 @@ + + + ++ ++ ++ KMessageWidget ++ QFrame ++
kmessagewidget.h
++ 1 ++
++
+ + + +-- +GitLab + + +From a35c2fc5b5e1561e4708fa01925806015082344b Mon Sep 17 00:00:00 2001 +From: Nate Graham +Date: Fri, 6 Aug 2021 09:14:14 -0600 +Subject: [PATCH 2/3] Remove link; simplify message + +--- + src/kcmodule/touchpagewidget.cpp | 8 -------- + src/kcmodule/touchpagewidget.ui | 5 +++-- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/src/kcmodule/touchpagewidget.cpp b/src/kcmodule/touchpagewidget.cpp +index f2facb0..880b067 100644 +--- a/src/kcmodule/touchpagewidget.cpp ++++ b/src/kcmodule/touchpagewidget.cpp +@@ -28,7 +28,6 @@ + #include "tabletareaselectiondialog.h" + #include "x11wacom.h" + +-#include + #include + #include + +@@ -401,11 +400,4 @@ void TouchPageWidget::setupUi() + ui->trackingWarningIcon->setPixmap(QIcon::fromTheme(QLatin1String("dialog-warning")).pixmap(QSize(16,16))); + ui->trackingWarningIcon->setVisible(false); + ui->trackingWarningLabel->setVisible(false); +- +- // Set this here instead of in the UI file because the string property in +- // the UI file will strip out HTML tags and break our link +- const QString bugReportURL = QStringLiteral("https://bugreports.qt.io/browse/QTBUG-84756"); +- ui->gesturesWarning->setText(i18n("Enabling gestures here is known to break touch input using a touchscreen. See %2 for details.", bugReportURL, bugReportURL)); +- // Open the link when the user clicks on it +- connect(ui->gesturesWarning, &KMessageWidget::linkActivated, this, [](const QString &str) { QDesktopServices::openUrl(QUrl(str)); } ); + } +diff --git a/src/kcmodule/touchpagewidget.ui b/src/kcmodule/touchpagewidget.ui +index 19d9537..9d79a88 100644 +--- a/src/kcmodule/touchpagewidget.ui ++++ b/src/kcmodule/touchpagewidget.ui +@@ -13,14 +13,15 @@ + + + ++ ++ Enabling gestures may break touch input using a touchscreen. ++ + + false + + + false + +- + + true + +-- +GitLab + + +From be18f8c9e1e70690e0056a6bce297c71fcca62be Mon Sep 17 00:00:00 2001 +From: David Edmundson +Date: Fri, 6 Aug 2021 16:21:51 +0000 +Subject: [PATCH 3/3] Apply 2 suggestion(s) to 1 file(s) + +--- + src/kcmodule/touchpagewidget.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/kcmodule/touchpagewidget.cpp b/src/kcmodule/touchpagewidget.cpp +index 880b067..8801bd0 100644 +--- a/src/kcmodule/touchpagewidget.cpp ++++ b/src/kcmodule/touchpagewidget.cpp +@@ -115,7 +115,7 @@ void TouchPageWidget::saveToProfile(ProfileManagementInterface &profileManagemen + + void TouchPageWidget::onGesturesModeChanged(int state) + { +- if (state == 0) { ++ if (state == Qt::Unchecked) { + ui->gesturesWarning->animatedHide(); + } else { + ui->gesturesWarning->animatedShow(); +@@ -156,7 +156,7 @@ void TouchPageWidget::onTouchModeChanged(int state) + { + // Show/hide the gestures warning as needed, since its UI gets enabled and + // disabled dynamically when touch is turned on or off +- if (state == 0) { ++ if (state == Qt::Unchecked) { + ui->gesturesWarning->animatedHide(); + } else if (ui->gesturesCheckBox->isChecked()) { + ui->gesturesWarning->animatedShow(); +-- +GitLab + diff --git a/testing/wacomtablet/APKBUILD b/testing/wacomtablet/APKBUILD new file mode 100644 index 00000000000..1cd8be21b39 --- /dev/null +++ b/testing/wacomtablet/APKBUILD @@ -0,0 +1,59 @@ +# Contributor: Bart Ribbers +# Maintainer: Bart Ribbers +pkgname=wacomtablet +pkgver=3.2.0 +pkgrel=0 +pkgdesc="GUI for Wacom Linux drivers that supports different button/pen layout profiles" +# armhf blocked by qt5-qtdeclarative +# mips64, s390x and riscv64 blocked by polkit -> kxmlgui +arch="all !armhf !mips64 !s390x !riscv64" +url="https://kde.org/plasma-desktop/" +license="GPL-2.0-or-later" +depends="xinput" +makedepends=" + extra-cmake-modules + kconfig-dev + kcoreaddons-dev + kdbusaddons-dev + kdoctools-dev + kglobalaccel-dev + ki18n-dev + knotifications-dev + kwidgetsaddons-dev + kwindowsystem-dev + kxmlgui-dev + libwacom-dev + plasma-framework-dev + qt5-qtbase-dev + qt5-qtdeclarative-dev + xf86-input-wacom-dev + " +checkdepends="xvfb-run" + +source="https://download.kde.org/stable/wacomtablet/$pkgver/wacomtablet-$pkgver.tar.xz + 0001-qt-5.15.patch + 0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch + " +subpackages="$pkgname-lang $pkgname-doc" + +build() { + cmake -B build \ + -DCMAKE_BUILD_TYPE=None \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_LIBDIR=lib + cmake --build build +} + +check() { + cd build + CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "Test.KDED.DBusTabletService" +} + +package() { + DESTDIR="$pkgdir" cmake --install build +} +sha512sums=" +acbabd6d6546bc85f0ed4e245668dc89b1c2ecaedd3754bf7ad8027b90f3ae81e5312395376de272dcbd416a9a1115bff2481351bd3f418bef7fa06d0db0c5a6 wacomtablet-3.2.0.tar.xz +120b2e3b57159d0bcfbee707d4f328c2dbeef846d449f5fde7b452da99bcd2de79463bd63e88dc26d7c9071e6fbd112dd528d5c05817bc16c16276004ab4b78f 0001-qt-5.15.patch +b17bb7afcea1eeda529ec0a5bdc90d134eae7b39529fe369b0b1e16b5a9354b41c7affa89d8b2ac58e48c8b3d044cb09025da85644ca7ac472d749f1fefbb067 0002-turn-off-gesture-support-by-default-and-warn-when-turning-it-on-manually.patch +" -- cgit v1.2.3