Make tablet detection work with new wacom drivers (#569132)
This commit is contained in:
parent
0a814aab28
commit
b4dd757e2a
|
@ -1,60 +0,0 @@
|
||||||
--- qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h.orig 2009-03-15 00:21:08.000000000 -0500
|
|
||||||
+++ qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Threading.h 2009-03-15 00:22:38.000000000 -0500
|
|
||||||
@@ -196,14 +196,14 @@
|
|
||||||
#elif COMPILER(GCC)
|
|
||||||
#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
|
|
||||||
|
|
||||||
-inline void atomicIncrement(int volatile* addend) { __gnu_cxx::__atomic_add(addend, 1); }
|
|
||||||
-inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
|
|
||||||
+inline void atomicIncrement(_Atomic_word volatile* addend) { __gnu_cxx::__atomic_add(addend, 1); }
|
|
||||||
+inline _Atomic_word atomicDecrement(_Atomic_word volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
template<class T> class ThreadSafeShared : Noncopyable {
|
|
||||||
public:
|
|
||||||
- ThreadSafeShared(int initialRefCount = 1)
|
|
||||||
+ ThreadSafeShared(_Atomic_word initialRefCount = 1)
|
|
||||||
: m_refCount(initialRefCount)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
@@ -237,16 +237,16 @@
|
|
||||||
return refCount() == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- int refCount() const
|
|
||||||
+ _Atomic_word refCount() const
|
|
||||||
{
|
|
||||||
#if !USE(LOCKFREE_THREADSAFESHARED)
|
|
||||||
MutexLocker locker(m_mutex);
|
|
||||||
#endif
|
|
||||||
- return static_cast<int const volatile &>(m_refCount);
|
|
||||||
+ return static_cast<_Atomic_word const volatile &>(m_refCount);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
- int m_refCount;
|
|
||||||
+ _Atomic_word m_refCount;
|
|
||||||
#if !USE(LOCKFREE_THREADSAFESHARED)
|
|
||||||
mutable Mutex m_mutex;
|
|
||||||
#endif
|
|
||||||
--- qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h.orig 2009-03-15 00:21:37.000000000 -0500
|
|
||||||
+++ qt-x11-opensource-src-4.5.0/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h 2009-03-15 00:22:38.000000000 -0500
|
|
||||||
@@ -214,9 +214,16 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PLATFORM(SPARC64) */
|
|
||||||
-#if defined(__sparc64__)
|
|
||||||
+#if defined(__sparc64__) \
|
|
||||||
+ || defined(__sparc__) && defined(_arch64__)
|
|
||||||
#define WTF_PLATFORM_SPARC64 1
|
|
||||||
#define WTF_PLATFORM_BIG_ENDIAN 1
|
|
||||||
+#else
|
|
||||||
+/* PLATFORM(SPARC) */
|
|
||||||
+#if defined(__sparc__)
|
|
||||||
+#define WTF_PLATFORM_SPARC 1
|
|
||||||
+#define WTF_PLATFORM_BIG_ENDIAN 1
|
|
||||||
+#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* PLATFORM(WIN_CE) && PLATFORM(QT)
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
From f1e39e7dea8634695263435f0bf912ce19c43195 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Thomas Zander <t.zander@nokia.com>
|
||||||
|
Date: Thu, 4 Mar 2010 13:16:09 +0100
|
||||||
|
Subject: [PATCH] Make tablet detection work with new wacom drivers
|
||||||
|
|
||||||
|
wacom driver fixed a bug in assigning atom names where it messed
|
||||||
|
up the device names. Their solution apparently renamed the atoms
|
||||||
|
The type names used now are "STYLUS", "CURSOR", "ERASER", "PAD"
|
||||||
|
and "TOUCH" for each respective device. This change detects
|
||||||
|
those as our tablet input devices.
|
||||||
|
|
||||||
|
Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
|
||||||
|
Task-number: QTBUG-8599
|
||||||
|
---
|
||||||
|
src/gui/kernel/qapplication_x11.cpp | 9 +++++++--
|
||||||
|
src/gui/kernel/qt_x11_p.h | 3 +++
|
||||||
|
2 files changed, 10 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp
|
||||||
|
index 121e9ec..25a7750 100644
|
||||||
|
--- a/src/gui/kernel/qapplication_x11.cpp
|
||||||
|
+++ b/src/gui/kernel/qapplication_x11.cpp
|
||||||
|
@@ -320,9 +320,14 @@ static const char * x11_atomnames = {
|
||||||
|
"_XEMBED\0"
|
||||||
|
"_XEMBED_INFO\0"
|
||||||
|
|
||||||
|
+ // Wacom old. (before version 0.10)
|
||||||
|
"Wacom Stylus\0"
|
||||||
|
"Wacom Cursor\0"
|
||||||
|
"Wacom Eraser\0"
|
||||||
|
+
|
||||||
|
+ // Tablet
|
||||||
|
+ "STYLUS\0"
|
||||||
|
+ "ERASER\0"
|
||||||
|
};
|
||||||
|
|
||||||
|
Q_GUI_EXPORT QX11Data *qt_x11Data = 0;
|
||||||
|
@@ -2366,12 +2371,12 @@ void qt_init(QApplicationPrivate *priv, int,
|
||||||
|
gotStylus = true;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
- if (devs->type == ATOM(XWacomStylus)) {
|
||||||
|
+ if (devs->type == ATOM(XWacomStylus) || devs->type == ATOM(XTabletStylus)) {
|
||||||
|
deviceType = QTabletEvent::Stylus;
|
||||||
|
if (wacomDeviceName()->isEmpty())
|
||||||
|
wacomDeviceName()->append(devs->name);
|
||||||
|
gotStylus = true;
|
||||||
|
- } else if (devs->type == ATOM(XWacomEraser)) {
|
||||||
|
+ } else if (devs->type == ATOM(XWacomEraser) || devs->type == ATOM(XTabletEraser)) {
|
||||||
|
deviceType = QTabletEvent::XFreeEraser;
|
||||||
|
gotEraser = true;
|
||||||
|
}
|
||||||
|
diff --git a/src/gui/kernel/qt_x11_p.h b/src/gui/kernel/qt_x11_p.h
|
||||||
|
index d110084..14e04bb 100644
|
||||||
|
--- a/src/gui/kernel/qt_x11_p.h
|
||||||
|
+++ b/src/gui/kernel/qt_x11_p.h
|
||||||
|
@@ -675,6 +675,9 @@ struct QX11Data
|
||||||
|
XWacomCursor,
|
||||||
|
XWacomEraser,
|
||||||
|
|
||||||
|
+ XTabletStylus,
|
||||||
|
+ XTabletEraser,
|
||||||
|
+
|
||||||
|
NPredefinedAtoms,
|
||||||
|
|
||||||
|
_QT_SETTINGS_TIMESTAMP = NPredefinedAtoms,
|
||||||
|
--
|
||||||
|
1.6.1
|
||||||
|
|
23
qt.spec
23
qt.spec
|
@ -13,7 +13,7 @@ Summary: Qt toolkit
|
||||||
Name: qt
|
Name: qt
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 4.6.2
|
Version: 4.6.2
|
||||||
Release: 3%{?dist}
|
Release: 5%{?dist}
|
||||||
|
|
||||||
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
|
@ -51,7 +51,6 @@ Requires: ca-certificates
|
||||||
## upstreamable bits
|
## upstreamable bits
|
||||||
# http://bugzilla.redhat.com/485677
|
# http://bugzilla.redhat.com/485677
|
||||||
Patch51: qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch
|
Patch51: qt-everywhere-opensource-src-4.6.0-beta1-qdoc3.patch
|
||||||
Patch52: qt-4.5-sparc64.patch
|
|
||||||
# fix invalid inline assembly in qatomic_{i386,x86_64}.h (de)ref implementations
|
# fix invalid inline assembly in qatomic_{i386,x86_64}.h (de)ref implementations
|
||||||
Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
|
Patch53: qt-x11-opensource-src-4.5.0-fix-qatomic-inline-asm.patch
|
||||||
# fix invalid assumptions about mysql_config --libs
|
# fix invalid assumptions about mysql_config --libs
|
||||||
|
@ -73,7 +72,7 @@ Patch207: 0007-When-using-qmake-outside-qt-src-tree-it-sometimes-ge.patch
|
||||||
Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch
|
Patch208: 0008-This-patch-makes-the-raster-graphics-system-use-shar.patch
|
||||||
Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch
|
Patch209: 0009-Restore-a-section-of-the-file-that-got-removed-due-t.patch
|
||||||
Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch
|
Patch212: 0012-Add-context-to-tr-calls-in-QShortcut.patch
|
||||||
|
Patch213: qt-x11-opensource-src-4.6.2-tablet-wacom-QTBUG-8599.patch
|
||||||
|
|
||||||
Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg
|
Source10: http://gstreamer.freedesktop.org/data/images/artwork/gstreamer-logo.svg
|
||||||
Source11: hi16-phonon-gstreamer.png
|
Source11: hi16-phonon-gstreamer.png
|
||||||
|
@ -399,8 +398,6 @@ Qt libraries used for drawing widgets and OpenGL items.
|
||||||
%patch21 -p1 -b .gst-pulsaudio
|
%patch21 -p1 -b .gst-pulsaudio
|
||||||
%patch22 -p1 -b .system_ca_certificates
|
%patch22 -p1 -b .system_ca_certificates
|
||||||
%patch51 -p1 -b .qdoc3
|
%patch51 -p1 -b .qdoc3
|
||||||
## FIXME: port patch
|
|
||||||
#patch52 -p1 -b .sparc64
|
|
||||||
## TODO: still worth carrying? if so, upstream it.
|
## TODO: still worth carrying? if so, upstream it.
|
||||||
%patch53 -p1 -b .qatomic-inline-asm
|
%patch53 -p1 -b .qatomic-inline-asm
|
||||||
## TODO: upstream me
|
## TODO: upstream me
|
||||||
|
@ -418,15 +415,23 @@ Qt libraries used for drawing widgets and OpenGL items.
|
||||||
%patch206 -p1 -b .kde-qt-0006
|
%patch206 -p1 -b .kde-qt-0006
|
||||||
%patch207 -p1 -b .kde-qt-0007
|
%patch207 -p1 -b .kde-qt-0007
|
||||||
%patch212 -p1 -b .kde-qt-0012
|
%patch212 -p1 -b .kde-qt-0012
|
||||||
|
%patch213 -p1 -b .tablet-wacom-QTBUG-8599
|
||||||
|
|
||||||
# drop -fexceptions from $RPM_OPT_FLAGS
|
# drop -fexceptions from $RPM_OPT_FLAGS
|
||||||
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
||||||
|
|
||||||
%define platform linux-g++
|
%define platform linux-g++
|
||||||
%if "%{_qt4_datadir}" != "%{_qt4_prefix}" && "%{_lib}" == "lib64"
|
|
||||||
|
# some 64bit platforms assume -64 suffix, https://bugzilla.redhat.com/569542
|
||||||
|
%if "%{?__isa_bits}" == "64"
|
||||||
%define platform linux-g++-64
|
%define platform linux-g++-64
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/478481
|
||||||
|
%ifarch x86_64
|
||||||
|
%define platform linux-g++
|
||||||
|
%endif
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s|-O2|$RPM_OPT_FLAGS|g" \
|
-e "s|-O2|$RPM_OPT_FLAGS|g" \
|
||||||
-e "s|g++.conf|g++-multilib.conf|g" mkspecs/%{platform}/qmake.conf
|
-e "s|g++.conf|g++-multilib.conf|g" mkspecs/%{platform}/qmake.conf
|
||||||
|
@ -1005,6 +1010,12 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 05 2010 Than Ngo <than@redhat.com> - 4.6.2-5
|
||||||
|
- Make tablet detection work with new wacom drivers (#569132)
|
||||||
|
|
||||||
|
* Mon Mar 01 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.6.2-4
|
||||||
|
- fix 64bit platform logic, use linux-g++-64 everywhere except x86_64 (#569542)
|
||||||
|
|
||||||
* Sun Feb 28 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-3
|
* Sun Feb 28 2010 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.6.2-3
|
||||||
- fix CUPS patch not to crash if currentPPD is NULL (#566304)
|
- fix CUPS patch not to crash if currentPPD is NULL (#566304)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue