Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.5
-
Linux hakua 5.4.206 #1 SMP Mon Jul 18 16:54:22 CEST 2022 ppc64 POWER9, altivec supported PowerNV T2P9D01 REV 1.00 GNU/Linux
Gentoo 17.0 desktop
Description
Input masks in XInput2 are arrays of bytes. Xlib provides convenience
macros XISetMask(), XIClearMask() and XIMaskIsSet() for finding the
correct byte in case the event number is 8 or larger. However, Qt
does not set up an array of bytes but rather a single 32-bit integer,
and assumes that as long as all events have numbers smaller than 32 it
can just set the corresponding bit in the 32-bit integer. This
happens to work on little endian since the byte order on LE matches
the hard-coded byte order of the input masks in XInput2. However, it
does not work on big endian where the byte order differs.
The issue can be observed in two ways on a big endian system:
- Mouse wheel events are not received
- Menus and other grab contexts do not receive mouse input (except if
QT_XCB_NO_XI2_MOUSE is set)
In my proposed patch (attached), I did not rewrite the code to use an array of bytes but simply added a conversion to little endian of the 32-bit integer, which solves the immediate issue.
Attachments
Issue Links
- is duplicated by
-
QTBUG-112526 Mousewheel does not work on big endian platforms
- Closed
Gerrit Reviews
For Gerrit Dashboard: QTBUG-105157 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
435062,5 | xcb: Use byte buffer for event masks | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: NEW | 0 | 0 |