Qt

Merge lp:~oif-team/qt/reenable-tablet into lp:~kubuntu-packagers/kubuntu-packaging/qt

Proposed by Chase Douglas
Status: Merged
Merged at revision: 173
Proposed branch: lp:~oif-team/qt/reenable-tablet
Merge into: lp:~kubuntu-packagers/kubuntu-packaging/qt
Diff against target: 133 lines (+23/-14)
2 files modified
debian/changelog (+7/-0)
debian/patches/kubuntu_28_xi2.1.patch (+16/-14)
To merge this branch: bzr merge lp:~oif-team/qt/reenable-tablet
Reviewer Review Type Date Requested Status
Denis Dzyubenko (community) Approve
Kubuntu Packagers Pending
Review via email: mp+64244@code.launchpad.net

Description of the change

The patch to enable XInput 2.1 multitouch support disabled XInput 1.x support. The Wacom tablet support depends on XInput 1.x support. The two XInput code paths should be able to work side by side, and with some minor modifications appear to do so without issue. I have tested tablet and multitouch support with this change and verified that they seem to work appropriately.

To post a comment you must log in.
Revision history for this message
Denis Dzyubenko (shadone) wrote :

Looks good to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-06-09 16:33:21 +0000
3+++ debian/changelog 2011-06-10 19:43:27 +0000
4@@ -1,3 +1,10 @@
5+qt4-x11 (4:4.7.3-1ubuntu4) UNRELEASED; urgency=low
6+
7+ * Re-enable tablet support (LP: #762938)
8+ - Updated kubuntu_28_xi2.1.patch with the fix
9+
10+ -- Chase Douglas <chase.douglas@ubuntu.com> Fri, 10 Jun 2011 13:09:55 -0400
11+
12 qt4-x11 (4:4.7.3-1ubuntu3) oneiric; urgency=low
13
14 * debian/rules:
15
16=== modified file 'debian/patches/kubuntu_28_xi2.1.patch'
17--- debian/patches/kubuntu_28_xi2.1.patch 2011-06-03 13:46:31 +0000
18+++ debian/patches/kubuntu_28_xi2.1.patch 2011-06-10 19:43:27 +0000
19@@ -148,7 +148,7 @@
20 $XIY -xinput ............ Compile Xinput support. This also enabled tablet support
21 which requires IRIX with wacom.h and libXi or
22 XFree86 with X11/extensions/XInput.h and libXi.
23-@@ -5934,7 +5952,23 @@
24+@@ -5934,7 +5952,22 @@
25 fi
26 fi
27
28@@ -157,7 +157,6 @@
29 + if [ "$CFG_XINPUT2" != "no" ]; then
30 + if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/x11/xinput2 "XInput2" $L_FLAGS $I_FLAGS $l_FLAGS $X11TESTS_FLAGS; then
31 + CFG_XINPUT2=yes
32-+ CFG_XINPUT=no
33 + else
34 + if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
35 + echo "XInput2 support cannot be enabled due to functionality tests!"
36@@ -351,11 +350,12 @@
37 // ### This should be static but it isn't because of the friend declaration
38 // ### in qpaintdevice.h which then should have a static too but can't have
39 // ### it because "storage class specifiers invalid in friend function
40-@@ -1659,9 +1678,13 @@
41+@@ -1659,9 +1678,14 @@
42
43 // XInputExtension
44 X11->use_xinput = false;
45 - X11->xinput_major = 0;
46++ X11->use_xinput2 = false;
47 + X11->xinput_opcode = 0;
48 X11->xinput_eventbase = 0;
49 X11->xinput_errorbase = 0;
50@@ -366,23 +366,24 @@
51
52 X11->use_xkb = false;
53 X11->xkb_major = 0;
54-@@ -2123,14 +2146,25 @@
55+@@ -2123,14 +2146,26 @@
56 #endif // QT_RUNTIME_XINERAMA
57 #endif // QT_NO_XINERAMA
58
59 -#ifndef QT_NO_XINPUT
60 +#if !defined(QT_NO_XINPUT2)
61-+ X11->use_xinput = XQueryExtension(X11->display, "XInputExtension", &X11->xinput_opcode,
62++ X11->use_xinput2 = XQueryExtension(X11->display, "XInputExtension", &X11->xinput_opcode,
63 + &X11->xinput_eventbase, &X11->xinput_errorbase);
64-+ if (X11->use_xinput) {
65++ if (X11->use_xinput2) {
66 + // we want XInput2
67 + int ximajor = 2, ximinor = 1;
68 + if (XIQueryVersion(X11->display, &ximajor, &ximinor) == BadRequest) {
69 + // XInput2 not available
70-+ X11->use_xinput = false;
71++ X11->use_xinput2 = false;
72 + }
73 + }
74-+#elif !defined(QT_NO_XINPUT)
75++#endif
76++#if !defined(QT_NO_XINPUT)
77 // See if Xinput is supported on the connected display
78 X11->ptrXCloseDevice = 0;
79 X11->ptrXListInputDevices = 0;
80@@ -409,7 +410,7 @@
81 break;
82 +#if !defined(QT_NO_XINPUT2)
83 + case GenericEvent:
84-+ if (X11->use_xinput
85++ if (X11->use_xinput2
86 + && XGetEventData(X11->display, &event->xcookie)
87 + && event->xcookie.extension == X11->xinput_opcode) {
88 + // remember for later
89@@ -757,15 +758,15 @@
90 ===================================================================
91 --- qt-everywhere-opensource-src-4.7.2.orig/src/gui/kernel/qt_x11_p.h 2011-02-22 12:03:58.000000000 +0000
92 +++ qt-everywhere-opensource-src-4.7.2/src/gui/kernel/qt_x11_p.h 2011-03-02 18:15:16.057309732 +0000
93-@@ -97,13 +97,14 @@
94+@@ -97,13 +97,15 @@
95 # include <X11/extensions/shape.h>
96 #endif // QT_NO_SHAPE
97
98 -
99--#if !defined (QT_NO_TABLET)
100 +#if !defined(QT_NO_XINPUT2)
101 +# include <X11/extensions/XInput2.h>
102-+#elif !defined (QT_NO_TABLET)
103++#endif
104+ #if !defined (QT_NO_TABLET)
105 # include <X11/extensions/XInput.h>
106 -#if defined (Q_OS_IRIX)
107 -# include <X11/extensions/SGIMisc.h>
108@@ -778,7 +779,7 @@
109 #endif // QT_NO_TABLET
110
111
112-@@ -434,11 +435,15 @@
113+@@ -434,11 +435,16 @@
114 bool use_mitshm_pixmaps;
115 int mitshm_major;
116
117@@ -786,6 +787,7 @@
118 + // true if Qt is compiled w/ XInput2 or Tablet support and we have a tablet.
119 bool use_xinput;
120 - int xinput_major;
121++ bool use_xinput2;
122 + int xinput_opcode;
123 int xinput_eventbase;
124 int xinput_errorbase;
125@@ -900,7 +902,7 @@
126 + if (!q->testAttribute(Qt::WA_WState_Created) || q->windowType() == Qt::Desktop)
127 + return;
128 +
129-+ if (X11->use_xinput) {
130++ if (X11->use_xinput2) {
131 + XIEventMask xieventmask;
132 +
133 + const int mask_len = XIMaskLen(XI_LASTEVENT);

Subscribers

People subscribed via source and target branches