summaryrefslogtreecommitdiff
path: root/user/qt5-qtbase/big-endian-scroll-wheel.patch
blob: 3fbb8aec74c612551f1fbe544fb726caada6acbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
--- qtbase-opensource-src-5.9.7/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp.old	2018-10-16 08:37:05.000000000 +0000
+++ qtbase-opensource-src-5.9.7/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp	2019-08-03 03:58:05.875790720 +0000
@@ -43,6 +43,7 @@
 #include "qxcbwindow.h"
 #include "qtouchdevice.h"
 #include "QtCore/qmetaobject.h"
+#include "QtCore/qendian.h"
 #include <qpa/qwindowsysteminterface_p.h>
 #include <QDebug>
 #include <cmath>
@@ -106,6 +107,7 @@
     XIEventMask xiEventMask;
     bitMask = XI_HierarchyChangedMask;
     bitMask |= XI_DeviceChangedMask;
+    bitMask = qToLittleEndian(bitMask);
     xiEventMask.deviceid = XIAllDevices;
     xiEventMask.mask_len = sizeof(bitMask);
     xiEventMask.mask = xiBitMask;
@@ -327,7 +329,8 @@
         }
         XIEventMask mask;
         mask.mask_len = sizeof(bitMask);
+        bitMask = qToLittleEndian(bitMask);
         mask.mask = xiBitMask;
         // When xi2MouseEvents() is true (the default), pointer emulation for touch and tablet
         // events will get disabled. This is preferable, as Qt Quick handles touch events
         // directly, while for other applications QtGui synthesizes mouse events.
@@ -353,6 +356,7 @@
         tabletBitMask = XI_PropertyEventMask;
         if (!pointerSelected)
             tabletBitMask |= XI_ButtonPressMask | XI_ButtonReleaseMask | XI_MotionMask;
+        tabletBitMask = qToLittleEndian(tabletBitMask);
         for (int i = 0; i < m_tabletData.count(); ++i) {
             int deviceId = m_tabletData.at(i).deviceId;
             tabletDevices.insert(deviceId);
@@ -374,6 +378,7 @@
 
         scrollBitMask = XI_MotionMask;
         scrollBitMask |= XI_ButtonReleaseMask;
+        scrollBitMask = qToLittleEndian(scrollBitMask);
         int i=0;
         for (const ScrollingDevice& scrollingDevice : qAsConst(m_scrollingDevices)) {
             if (tabletDevices.contains(scrollingDevice.deviceId))