summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-04-03 20:54:58 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2019-04-03 20:58:40 +0200
commit68d2cb566ccf6c5b4cec5d6f021484b2216ad0a8 (patch)
treec2903a2e5de623e1adb3a58bd7fc5526c673b77c /media-gfx/krita/files
parentdev-util/ninja: bump to 1.9.0 (diff)
downloadgentoo-68d2cb566ccf6c5b4cec5d6f021484b2216ad0a8.tar.gz
gentoo-68d2cb566ccf6c5b4cec5d6f021484b2216ad0a8.tar.bz2
gentoo-68d2cb566ccf6c5b4cec5d6f021484b2216ad0a8.zip
media-gfx/krita: Add upstream tablet support and crash fix
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-gfx/krita/files')
-rw-r--r--media-gfx/krita/files/krita-4.1.8-fix-pre-5.12-tablet-support.patch49
-rw-r--r--media-gfx/krita/files/krita-4.1.8-qt-5.12-fix-unsupported-composition-mode.patch38
2 files changed, 87 insertions, 0 deletions
diff --git a/media-gfx/krita/files/krita-4.1.8-fix-pre-5.12-tablet-support.patch b/media-gfx/krita/files/krita-4.1.8-fix-pre-5.12-tablet-support.patch
new file mode 100644
index 00000000000..2928247e57a
--- /dev/null
+++ b/media-gfx/krita/files/krita-4.1.8-fix-pre-5.12-tablet-support.patch
@@ -0,0 +1,49 @@
+From 0218025b1725aa810f108d08802b590ce62f1044 Mon Sep 17 00:00:00 2001
+From: Dmitry Kazakov <dimula73@gmail.com>
+Date: Mon, 25 Mar 2019 21:16:41 +0300
+Subject: Add a workaround for Qt 5.9...5.11.X to fix tablet support
+
+Basically, the patch mimics this Qt's patch that has been
+added in Qt 5.12.0 only:
+https://codereview.qt-project.org/#/c/239918/
+
+BUG:399696
+---
+ libs/ui/input/kis_input_manager_p.cpp | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/libs/ui/input/kis_input_manager_p.cpp b/libs/ui/input/kis_input_manager_p.cpp
+index 4f5a58f..0a26655 100644
+--- a/libs/ui/input/kis_input_manager_p.cpp
++++ b/libs/ui/input/kis_input_manager_p.cpp
+@@ -333,6 +333,28 @@ KisInputManager::Private::ProximityNotifier::ProximityNotifier(KisInputManager::
+
+ bool KisInputManager::Private::ProximityNotifier::eventFilter(QObject* object, QEvent* event )
+ {
++ /**
++ * All Qt builds in range 5.7.0...5.11.X on X11 had a problem that made all
++ * the tablet events be accepted by default. It meant that no mouse
++ * events were synthesized, and, therefore, no Enter/Leave were generated.
++ *
++ * The fix for this bug has been added only in Qt 5.12.0:
++ * https://codereview.qt-project.org/#/c/239918/
++ *
++ * To avoid this problem we should explicitly ignore all the tablet events.
++ */
++#if defined Q_OS_LINUX && \
++ QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) && \
++ QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
++
++ if (event->type() == QEvent::TabletMove ||
++ event->type() == QEvent::TabletPress ||
++ event->type() == QEvent::TabletRelease) {
++
++ event->ignore();
++ }
++#endif
++
+ switch (event->type()) {
+ case QEvent::TabletEnterProximity:
+ d->debugEvent<QEvent, false>(event);
+--
+cgit v1.1
diff --git a/media-gfx/krita/files/krita-4.1.8-qt-5.12-fix-unsupported-composition-mode.patch b/media-gfx/krita/files/krita-4.1.8-qt-5.12-fix-unsupported-composition-mode.patch
new file mode 100644
index 00000000000..dc65b1c49d2
--- /dev/null
+++ b/media-gfx/krita/files/krita-4.1.8-qt-5.12-fix-unsupported-composition-mode.patch
@@ -0,0 +1,38 @@
+From 9347112a77b3b628af8c0b8d4d7cbc0929eede9e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Wolthera=20van=20H=C3=B6vell=20tot=20Westerflier?=
+ <griffinvalley@gmail.com>
+Date: Sat, 30 Mar 2019 21:47:37 +0100
+Subject: BUG:406032 Fix crash caused by unsupported composition mode in QT
+ 5.12
+
+Qt 5.12 doesn't support QPainter::RasterOp_SourceXorDestination anymore.
+
+Trying to paint with a painter that uses this while opengl is enabled
+will lead to a crash. The only relevant place this enum value is still used
+is in kis_tool.cc, where it is only painted on the regular non-accelerated canvas.
+
+Anyhow, told the smartpatch to use this function instead of doing something itself.
+
+The whole thing is a little bizar.
+---
+ plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
+index 656ba38..32577a3 100644
+--- a/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
++++ b/plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
+@@ -245,9 +245,8 @@ void KisToolSmartPatch::paint(QPainter &painter, const KoViewConverter &converte
+ Q_UNUSED(converter);
+
+ painter.save();
+- painter.setCompositionMode(QPainter::RasterOp_SourceXorDestination);
+- painter.setPen(QColor(128, 255, 128));
+- painter.drawPath(pixelToView(m_d->brushOutline));
++ QPainterPath path = pixelToView(m_d->brushOutline);
++ paintToolOutline(&painter, path);
+ painter.restore();
+
+ painter.save();
+--
+cgit v1.1