Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/input/wintab/kis_xi2_event_filter.cpp
Show First 20 Lines • Show All 116 Lines • ▼ Show 20 Line(s) | |||||
117 | 117 | | |||
118 | #if QT_VERSION >= 0x050500 | 118 | #if QT_VERSION >= 0x050500 | ||
119 | /** | 119 | /** | ||
120 | * I know we must be fed to crocodiles for hacks like this | 120 | * I know we must be fed to crocodiles for hacks like this | ||
121 | * one, but it is the best thing we can do after Qt 5.5 | 121 | * one, but it is the best thing we can do after Qt 5.5 | ||
122 | * started to process all the events using XInput 2.2. It | 122 | * started to process all the events using XInput 2.2. It | ||
123 | * means that Qt is not longer subscribed to the emulated | 123 | * means that Qt is not longer subscribed to the emulated | ||
124 | * mouse events that usually go after the tablet. Instead of | 124 | * mouse events that usually go after the tablet. Instead of | ||
125 | * the flow which was previosly generated by X11, Qt now | 125 | * the flow which was previously generated by X11, Qt now | ||
126 | * re-emits mouse events itself in | 126 | * re-emits mouse events itself in | ||
127 | * QXcbConnection::xi2HandleTabletEvent() using a call to | 127 | * QXcbConnection::xi2HandleTabletEvent() using a call to | ||
128 | * QXcbWindow::handleXIMouseEvent(). And, yes, here in Krita | 128 | * QXcbWindow::handleXIMouseEvent(). And, yes, here in Krita | ||
129 | * we don't have access to QXcbWindow. Even through private | 129 | * we don't have access to QXcbWindow. Even through private | ||
130 | * headers. So we have to use this "elegant" solution. | 130 | * headers. So we have to use this "elegant" solution. | ||
131 | * | 131 | * | ||
132 | * The solution is very simple. We just modify the 'sourceid' | 132 | * The solution is very simple. We just modify the 'sourceid' | ||
133 | * field of the currently processed event and pass it further | 133 | * field of the currently processed event and pass it further | ||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |