qwindowsysteminterface.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/gui/kernel/qwindowsysteminterface.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QElapsedTimer QWindowSystemInterfacePrivate::eventTime;-
6bool QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = false;-
7bool QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse = true;-
8QWaitCondition QWindowSystemInterfacePrivate::eventsFlushed;-
9QMutex QWindowSystemInterfacePrivate::flushEventMutex;-
10QAtomicInt QWindowSystemInterfacePrivate::eventAccepted;-
11QWindowSystemEventHandler *QWindowSystemInterfacePrivate::eventHandler;-
12-
13-
14-
15-
16-
17-
18QWindowSystemInterfacePrivate::WindowSystemEventList QWindowSystemInterfacePrivate::windowSystemEventQueue;-
19-
20extern QPointer<QWindow> qt_last_mouse_receiver;-
21void QWindowSystemInterface::handleEnterEvent(QWindow *tlw, const QPointF &local, const QPointF &global)-
22{-
23 if (tlw
tlwDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
24 QWindowSystemInterfacePrivate::EnterEvent *e = new QWindowSystemInterfacePrivate::EnterEvent(tlw, local, global);-
25 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
26 }
never executed: end of block
0
27}
never executed: end of block
0
28-
29void QWindowSystemInterface::handleLeaveEvent(QWindow *tlw)-
30{-
31 QWindowSystemInterfacePrivate::LeaveEvent *e = new QWindowSystemInterfacePrivate::LeaveEvent(tlw);-
32 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
33}
never executed: end of block
0
34void QWindowSystemInterface::handleEnterLeaveEvent(QWindow *enter, QWindow *leave, const QPointF &local, const QPointF& global)-
35{-
36 bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;-
37 if (wasSynchronous
wasSynchronousDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
38 setSynchronousWindowSystemEvents(false);
never executed: setSynchronousWindowSystemEvents(false);
0
39 handleLeaveEvent(leave);-
40 handleEnterEvent(enter, local, global);-
41 if (wasSynchronous
wasSynchronousDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
42 flushWindowSystemEvents();-
43 setSynchronousWindowSystemEvents(true);-
44 }
never executed: end of block
0
45}
never executed: end of block
0
46-
47void QWindowSystemInterface::handleWindowActivated(QWindow *tlw, Qt::FocusReason r)-
48{-
49 QWindowSystemInterfacePrivate::ActivatedWindowEvent *e =-
50 new QWindowSystemInterfacePrivate::ActivatedWindowEvent(tlw, r);-
51 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
52}
never executed: end of block
0
53-
54void QWindowSystemInterface::handleWindowStateChanged(QWindow *tlw, Qt::WindowState newState)-
55{-
56 QWindowSystemInterfacePrivate::WindowStateChangedEvent *e =-
57 new QWindowSystemInterfacePrivate::WindowStateChangedEvent(tlw, newState);-
58 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
59}
never executed: end of block
0
60-
61void QWindowSystemInterface::handleWindowScreenChanged(QWindow *tlw, QScreen *screen)-
62{-
63 QWindowSystemInterfacePrivate::WindowScreenChangedEvent *e =-
64 new QWindowSystemInterfacePrivate::WindowScreenChangedEvent(tlw, screen);-
65 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
66}
never executed: end of block
0
67-
68void QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate)-
69{-
70 ((!(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState))) ? qt_assert("QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState)",__FILE__,141) : qt_noop());-
71 QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *e =-
72 new QWindowSystemInterfacePrivate::ApplicationStateChangedEvent(newState, forcePropagate);-
73 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
74}
never executed: end of block
0
75-
76-
77-
78-
79void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &newRect, const QRect &oldRect)-
80{-
81 QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw, QHighDpi::fromNativePixels(newRect, tlw), QHighDpi::fromNativePixels(oldRect, tlw));-
82 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
83}
never executed: end of block
0
84-
85void QWindowSystemInterface::handleCloseEvent(QWindow *tlw, bool *accepted)-
86{-
87 if (tlw
tlwDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
88 QWindowSystemInterfacePrivate::CloseEvent *e =-
89 new QWindowSystemInterfacePrivate::CloseEvent(tlw, accepted);-
90 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
91 }
never executed: end of block
0
92}
never executed: end of block
0
93-
94-
95-
96-
97-
98-
99void QWindowSystemInterface::handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b,-
100 Qt::KeyboardModifiers mods, Qt::MouseEventSource source)-
101{-
102 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
103 handleMouseEvent(w, time, local, global, b, mods, source);-
104}
never executed: end of block
0
105-
106void QWindowSystemInterface::handleMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b,-
107 Qt::KeyboardModifiers mods, Qt::MouseEventSource source)-
108{-
109 QWindowSystemInterfacePrivate::MouseEvent * e =-
110 new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp, QHighDpi::fromNativeLocalPosition(local, w), QHighDpi::fromNativePixels(global, w), b, mods, source);-
111 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
112}
never executed: end of block
0
113-
114void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b,-
115 Qt::KeyboardModifiers mods, Qt::MouseEventSource source)-
116{-
117 const unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
118 handleFrameStrutMouseEvent(w, time, local, global, b, mods, source);-
119}
never executed: end of block
0
120-
121void QWindowSystemInterface::handleFrameStrutMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b,-
122 Qt::KeyboardModifiers mods, Qt::MouseEventSource source)-
123{-
124 QWindowSystemInterfacePrivate::MouseEvent * e =-
125 new QWindowSystemInterfacePrivate::MouseEvent(w, timestamp,-
126 QWindowSystemInterfacePrivate::FrameStrutMouse,-
127 QHighDpi::fromNativeLocalPosition(local, w), QHighDpi::fromNativePixels(global, w), b, mods, source);-
128 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
129}
never executed: end of block
0
130-
131bool QWindowSystemInterface::handleShortcutEvent(QWindow *window, ulong timestamp, int keyCode, Qt::KeyboardModifiers modifiers, quint32 nativeScanCode,-
132 quint32 nativeVirtualKey, quint32 nativeModifiers, const QString &text, bool autorepeat, ushort count)-
133{-
134-
135 if (!window
!windowDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
136 window = QGuiApplication::focusWindow();
never executed: window = QGuiApplication::focusWindow();
0
137-
138 QShortcutMap &shortcutMap = QGuiApplicationPrivate::instance()->shortcutMap;-
139 if (shortcutMap.state() == QKeySequence::NoMatch
shortcutMap.st...uence::NoMatchDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
140-
141-
142-
143-
144-
145 QWindowSystemInterfacePrivate::KeyEvent *shortcutOverrideEvent = new QWindowSystemInterfacePrivate::KeyEvent(window, timestamp,-
146 QEvent::ShortcutOverride, keyCode, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorepeat, count);-
147-
148 {-
149-
150 QScopedValueRollback<bool> syncRollback(QWindowSystemInterfacePrivate::synchronousWindowSystemEvents);-
151 QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = true;-
152-
153 if (QWindowSystemInterfacePrivate::handleWindowSystemEvent(shortcutOverrideEvent)
QWindowSystemI...OverrideEvent)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
154 return
never executed: return false;
false;
never executed: return false;
0
155 }-
156 }
never executed: end of block
0
157-
158-
159-
160-
161 QKeyEvent keyEvent(QEvent::ShortcutOverride, keyCode, modifiers, nativeScanCode,-
162 nativeVirtualKey, nativeModifiers, text, autorepeat, count);-
163-
164 return
never executed: return shortcutMap.tryShortcut(&keyEvent);
shortcutMap.tryShortcut(&keyEvent);
never executed: return shortcutMap.tryShortcut(&keyEvent);
0
165}-
166-
167-
168bool QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) {-
169 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
170 return
never executed: return handleKeyEvent(w, time, t, k, mods, text, autorep, count);
handleKeyEvent(w, time, t, k, mods, text, autorep, count);
never executed: return handleKeyEvent(w, time, t, k, mods, text, autorep, count);
0
171}-
172-
173bool QWindowSystemInterface::handleKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count)-
174{-
175-
176-
177-
178-
179-
180 QWindowSystemInterfacePrivate::KeyEvent * e =-
181 new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, t, k, mods, text, autorep, count);-
182 return
never executed: return QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed: return QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
0
183}-
184-
185bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *w, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers,-
186 quint32 nativeScanCode, quint32 nativeVirtualKey,-
187 quint32 nativeModifiers,-
188 const QString& text, bool autorep,-
189 ushort count, bool tryShortcutOverride)-
190{-
191 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
192 return
never executed: return handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count, tryShortcutOverride);
handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers,
never executed: return handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count, tryShortcutOverride);
0
193 text, autorep, count, tryShortcutOverride);
never executed: return handleExtendedKeyEvent(w, time, type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count, tryShortcutOverride);
0
194}-
195-
196bool QWindowSystemInterface::handleExtendedKeyEvent(QWindow *tlw, ulong timestamp, QEvent::Type type, int key,-
197 Qt::KeyboardModifiers modifiers,-
198 quint32 nativeScanCode, quint32 nativeVirtualKey,-
199 quint32 nativeModifiers,-
200 const QString& text, bool autorep,-
201 ushort count, bool tryShortcutOverride)-
202{-
203-
204-
205-
206-
207-
208-
209 (void)tryShortcutOverride;-
210-
211-
212 QWindowSystemInterfacePrivate::KeyEvent * e =-
213 new QWindowSystemInterfacePrivate::KeyEvent(tlw, timestamp, type, key, modifiers,-
214 nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);-
215 return
never executed: return QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
never executed: return QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);
0
216}-
217-
218void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods) {-
219 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
220 handleWheelEvent(w, time, local, global, d, o, mods);-
221}
never executed: end of block
0
222-
223void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, int d, Qt::Orientation o, Qt::KeyboardModifiers mods)-
224{-
225 QPoint point = (
(o == Qt::Vertical)Description
TRUEnever evaluated
FALSEnever evaluated
o == Qt::Vertical)
(o == Qt::Vertical)Description
TRUEnever evaluated
FALSEnever evaluated
? QPoint(0, d) : QPoint(d, 0);
0
226 handleWheelEvent(tlw, timestamp, local, global, QPoint(), point, mods);-
227}
never executed: end of block
0
228-
229void QWindowSystemInterface::handleWheelEvent(QWindow *w, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource source)-
230{-
231 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
232 handleWheelEvent(w, time, local, global, pixelDelta, angleDelta, mods, phase, source);-
233}
never executed: end of block
0
234-
235void QWindowSystemInterface::handleWheelEvent(QWindow *tlw, ulong timestamp, const QPointF & local, const QPointF & global, QPoint pixelDelta, QPoint angleDelta, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase,-
236 Qt::MouseEventSource source, bool invertedScrolling)-
237{-
238-
239-
240-
241-
242-
243-
244-
245 QWindowSystemInterfacePrivate::WheelEvent *e;-
246-
247-
248-
249 if (angleDelta.isNull()
angleDelta.isNull()Description
TRUEnever evaluated
FALSEnever evaluated
&& phase == Qt::ScrollUpdate
phase == Qt::ScrollUpdateDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
250 return;
never executed: return;
0
251-
252-
253 if (angleDelta.y() != 0
angleDelta.y() != 0Description
TRUEnever evaluated
FALSEnever evaluated
&& angleDelta.x() == 0
angleDelta.x() == 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
254 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, QHighDpi::fromNativeLocalPosition(local, tlw), QHighDpi::fromNativePixels(global, tlw), pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical,-
255 mods, phase, source, invertedScrolling);-
256 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
257 return;
never executed: return;
0
258 }-
259-
260-
261 if (angleDelta.y() == 0
angleDelta.y() == 0Description
TRUEnever evaluated
FALSEnever evaluated
&& angleDelta.x() != 0
angleDelta.x() != 0Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
262 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, QHighDpi::fromNativeLocalPosition(local, tlw), QHighDpi::fromNativePixels(global, tlw), pixelDelta, angleDelta, angleDelta.x(), Qt::Horizontal, mods, phase, source, invertedScrolling);-
263 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
264 return;
never executed: return;
0
265 }-
266-
267-
268-
269-
270 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, QHighDpi::fromNativeLocalPosition(local, tlw), QHighDpi::fromNativePixels(global, tlw), pixelDelta, angleDelta, angleDelta.y(), Qt::Vertical, mods, phase, source, invertedScrolling);-
271 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
272-
273-
274-
275 e = new QWindowSystemInterfacePrivate::WheelEvent(tlw, timestamp, QHighDpi::fromNativeLocalPosition(local, tlw), QHighDpi::fromNativePixels(global, tlw), QPoint(), QPoint(), angleDelta.x(), Qt::Horizontal, mods, phase, source, invertedScrolling);-
276 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
277}
never executed: end of block
0
278-
279-
280QWindowSystemInterfacePrivate::ExposeEvent::ExposeEvent(QWindow *exposed, const QRegion &region)-
281 : WindowSystemEvent(Expose)-
282 , exposed(exposed)-
283 , isExposed(exposed && exposed->handle() ? exposed->handle()->isExposed() : false)-
284 , region(region)-
285{-
286}
never executed: end of block
0
287-
288int QWindowSystemInterfacePrivate::windowSystemEventsQueued()-
289{-
290 return
never executed: return windowSystemEventQueue.count();
windowSystemEventQueue.count();
never executed: return windowSystemEventQueue.count();
0
291}-
292-
293QWindowSystemInterfacePrivate::WindowSystemEvent * QWindowSystemInterfacePrivate::getWindowSystemEvent()-
294{-
295 return
never executed: return windowSystemEventQueue.takeFirstOrReturnNull();
windowSystemEventQueue.takeFirstOrReturnNull();
never executed: return windowSystemEventQueue.takeFirstOrReturnNull();
0
296}-
297-
298QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent()-
299{-
300 return
never executed: return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
never executed: return windowSystemEventQueue.takeFirstNonUserInputOrReturnNull();
0
301}-
302-
303QWindowSystemInterfacePrivate::WindowSystemEvent *QWindowSystemInterfacePrivate::peekWindowSystemEvent(EventType t)-
304{-
305 return
never executed: return windowSystemEventQueue.peekAtFirstOfType(t);
windowSystemEventQueue.peekAtFirstOfType(t);
never executed: return windowSystemEventQueue.peekAtFirstOfType(t);
0
306}-
307-
308void QWindowSystemInterfacePrivate::removeWindowSystemEvent(WindowSystemEvent *event)-
309{-
310 windowSystemEventQueue.remove(event);-
311}
never executed: end of block
0
312-
313void QWindowSystemInterfacePrivate::postWindowSystemEvent(WindowSystemEvent *ev)-
314{-
315 windowSystemEventQueue.append(ev);-
316 QAbstractEventDispatcher *dispatcher = QGuiApplicationPrivate::qt_qpa_core_dispatcher();-
317 if (dispatcher
dispatcherDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
318 dispatcher->wakeUp();
never executed: dispatcher->wakeUp();
0
319}
never executed: end of block
0
320bool QWindowSystemInterfacePrivate::handleWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *ev)-
321{-
322 bool accepted = true;-
323 if (synchronousWindowSystemEvents
synchronousWindowSystemEventsDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
324 if (QThread::currentThread() == QGuiApplication::instance()->thread()
QThread::curre...ce()->thread()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
325-
326 QGuiApplicationPrivate::processWindowSystemEvent(ev);-
327 accepted = ev->eventAccepted;-
328 delete ev;-
329 }
never executed: end of block
else {
0
330-
331-
332-
333-
334 postWindowSystemEvent(ev);-
335 accepted = QWindowSystemInterface::flushWindowSystemEvents();-
336 }
never executed: end of block
0
337 } else {-
338 postWindowSystemEvent(ev);-
339 }
never executed: end of block
0
340 return
never executed: return accepted;
accepted;
never executed: return accepted;
0
341}-
342-
343void QWindowSystemInterface::registerTouchDevice(const QTouchDevice *device)-
344{-
345 QTouchDevicePrivate::registerDevice(device);-
346}
never executed: end of block
0
347-
348void QWindowSystemInterface::unregisterTouchDevice(const QTouchDevice *device)-
349{-
350 QTouchDevicePrivate::unregisterDevice(device);-
351}
never executed: end of block
0
352-
353bool QWindowSystemInterface::isTouchDeviceRegistered(const QTouchDevice *device)-
354{-
355 return
never executed: return QTouchDevicePrivate::isRegistered(device);
QTouchDevicePrivate::isRegistered(device);
never executed: return QTouchDevicePrivate::isRegistered(device);
0
356}-
357-
358void QWindowSystemInterface::handleTouchEvent(QWindow *w, QTouchDevice *device,-
359 const QList<TouchPoint> &points, Qt::KeyboardModifiers mods)-
360{-
361 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
362 handleTouchEvent(w, time, device, points, mods);-
363}
never executed: end of block
0
364-
365QList<QTouchEvent::TouchPoint>-
366 QWindowSystemInterfacePrivate::fromNativeTouchPoints(const QList<QWindowSystemInterface::TouchPoint> &points,-
367 const QWindow *window,-
368 QEvent::Type *type)-
369{-
370 QList<QTouchEvent::TouchPoint> touchPoints;-
371 Qt::TouchPointStates states;-
372 QTouchEvent::TouchPoint p;-
373-
374 touchPoints.reserve(points.count());-
375 QList<QWindowSystemInterface::TouchPoint>::const_iterator point = points.constBegin();-
376 QList<QWindowSystemInterface::TouchPoint>::const_iterator end = points.constEnd();-
377 while (point != end
point != endDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
378 p.setId(point->id);-
379 p.setPressure(point->pressure);-
380 states |= point->state;-
381 p.setState(point->state);-
382-
383 const QPointF screenPos = point->area.center();-
384 p.setScreenPos(QHighDpi::fromNativePixels(screenPos, window));-
385 p.setScreenRect(QHighDpi::fromNativePixels(point->area, window));-
386-
387-
388-
389-
390 p.setNormalizedPos(QHighDpi::fromNativePixels(point->normalPosition, window));-
391 p.setVelocity(QHighDpi::fromNativePixels(point->velocity, window));-
392 p.setFlags(point->flags);-
393 p.setRawScreenPositions(QHighDpi::fromNativePixels(point->rawPositions, window));-
394-
395 touchPoints.append(p);-
396 ++point;-
397 }
never executed: end of block
0
398-
399-
400 if (type
typeDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
401 *type = QEvent::TouchUpdate;-
402 if (states == Qt::TouchPointPressed
states == Qt::...chPointPressedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
403 *
never executed: *type = QEvent::TouchBegin;
type = QEvent::TouchBegin;
never executed: *type = QEvent::TouchBegin;
0
404 else if (states == Qt::TouchPointReleased
states == Qt::...hPointReleasedDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
405 *
never executed: *type = QEvent::TouchEnd;
type = QEvent::TouchEnd;
never executed: *type = QEvent::TouchEnd;
0
406 }
never executed: end of block
0
407-
408 return
never executed: return touchPoints;
touchPoints;
never executed: return touchPoints;
0
409}-
410-
411QList<QWindowSystemInterface::TouchPoint>-
412 QWindowSystemInterfacePrivate::toNativeTouchPoints(const QList<QTouchEvent::TouchPoint>& pointList,-
413 const QWindow *window)-
414{-
415 QList<QWindowSystemInterface::TouchPoint> newList;-
416 newList.reserve(pointList.size());-
417 for (const QTouchEvent::TouchPoint &pt : pointList) {-
418 QWindowSystemInterface::TouchPoint p;-
419 p.id = pt.id();-
420 p.flags = pt.flags();-
421 p.normalPosition = QHighDpi::toNativeLocalPosition(pt.normalizedPos(), window);-
422 p.area = QHighDpi::toNativePixels(pt.screenRect(), window);-
423 p.pressure = pt.pressure();-
424 p.state = pt.state();-
425 p.velocity = pt.velocity();-
426 p.rawPositions = pt.rawScreenPositions();-
427 newList.append(p);-
428 }
never executed: end of block
0
429 return
never executed: return newList;
newList;
never executed: return newList;
0
430}-
431-
432void QWindowSystemInterface::handleTouchEvent(QWindow *tlw, ulong timestamp, QTouchDevice *device,-
433 const QList<TouchPoint> &points, Qt::KeyboardModifiers mods)-
434{-
435 if (!points.size()
!points.size()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
436 return;
never executed: return;
0
437-
438 if (!QTouchDevicePrivate::isRegistered(device)
!QTouchDeviceP...stered(device)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
439 return;
never executed: return;
0
440-
441 QEvent::Type type;-
442 QList<QTouchEvent::TouchPoint> touchPoints = QWindowSystemInterfacePrivate::fromNativeTouchPoints(points, tlw, &type);-
443-
444 QWindowSystemInterfacePrivate::TouchEvent *e =-
445 new QWindowSystemInterfacePrivate::TouchEvent(tlw, timestamp, type, device, touchPoints, mods);-
446 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
447}
never executed: end of block
0
448-
449void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, QTouchDevice *device,-
450 Qt::KeyboardModifiers mods)-
451{-
452 unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
453 handleTouchCancelEvent(w, time, device, mods);-
454}
never executed: end of block
0
455-
456void QWindowSystemInterface::handleTouchCancelEvent(QWindow *w, ulong timestamp, QTouchDevice *device,-
457 Qt::KeyboardModifiers mods)-
458{-
459 QWindowSystemInterfacePrivate::TouchEvent *e =-
460 new QWindowSystemInterfacePrivate::TouchEvent(w, timestamp, QEvent::TouchCancel, device,-
461 QList<QTouchEvent::TouchPoint>(), mods);-
462 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
463}
never executed: end of block
0
464-
465void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation orientation)-
466{-
467 QWindowSystemInterfacePrivate::ScreenOrientationEvent *e =-
468 new QWindowSystemInterfacePrivate::ScreenOrientationEvent(screen, orientation);-
469 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
470}
never executed: end of block
0
471-
472void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry, const QRect &availableGeometry)-
473{-
474 QWindowSystemInterfacePrivate::ScreenGeometryEvent *e =-
475 new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, QHighDpi::fromNativeScreenGeometry(geometry, screen), QHighDpi::fromNative(availableGeometry, screen, geometry.topLeft()));-
476 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
477}
never executed: end of block
0
478-
479void QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(QScreen *screen, qreal dpiX, qreal dpiY)-
480{-
481 QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent *e =-
482 new QWindowSystemInterfacePrivate::ScreenLogicalDotsPerInchEvent(screen, dpiX, dpiY);-
483 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
484}
never executed: end of block
0
485-
486void QWindowSystemInterface::handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate)-
487{-
488 QWindowSystemInterfacePrivate::ScreenRefreshRateEvent *e =-
489 new QWindowSystemInterfacePrivate::ScreenRefreshRateEvent(screen, newRefreshRate);-
490 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
491}
never executed: end of block
0
492-
493void QWindowSystemInterface::handleThemeChange(QWindow *tlw)-
494{-
495 QWindowSystemInterfacePrivate::ThemeChangeEvent *e = new QWindowSystemInterfacePrivate::ThemeChangeEvent(tlw);-
496 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
497}
never executed: end of block
0
498-
499void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion &region)-
500{-
501 QWindowSystemInterfacePrivate::ExposeEvent *e =-
502 new QWindowSystemInterfacePrivate::ExposeEvent(tlw, QHighDpi::fromNativeLocalExposedRegion(region, tlw));-
503 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
504}
never executed: end of block
0
505-
506void QWindowSystemInterface::deferredFlushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)-
507{-
508 ((!(QThread::currentThread() == QGuiApplication::instance()->thread())) ? qt_assert("QThread::currentThread() == QGuiApplication::instance()->thread()",__FILE__,606) : qt_noop());-
509-
510 QMutexLocker locker(&QWindowSystemInterfacePrivate::flushEventMutex);-
511 sendWindowSystemEvents(flags);-
512 QWindowSystemInterfacePrivate::eventsFlushed.wakeOne();-
513}
never executed: end of block
0
514-
515-
516-
517-
518-
519bool QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)-
520{-
521 const int count = QWindowSystemInterfacePrivate::windowSystemEventQueue.count();-
522 if (!count
!countDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
523 return
never executed: return false;
false;
never executed: return false;
0
524 if (!QGuiApplication::instance()
!QGuiApplication::instance()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
525 QMessageLogger(__FILE__, 623, __PRETTY_FUNCTION__).warning().nospace()-
526 << "QWindowSystemInterface::flushWindowSystemEvents() invoked after "-
527 "QGuiApplication destruction, discarding " << count << " events.";-
528 QWindowSystemInterfacePrivate::windowSystemEventQueue.clear();-
529 return
never executed: return false;
false;
never executed: return false;
0
530 }-
531 if (QThread::currentThread() != QGuiApplication::instance()->thread()
QThread::curre...ce()->thread()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
532-
533-
534 QMutexLocker locker(&QWindowSystemInterfacePrivate::flushEventMutex);-
535 QWindowSystemInterfacePrivate::FlushEventsEvent *e = new QWindowSystemInterfacePrivate::FlushEventsEvent(flags);-
536 QWindowSystemInterfacePrivate::postWindowSystemEvent(e);-
537 QWindowSystemInterfacePrivate::eventsFlushed.wait(&QWindowSystemInterfacePrivate::flushEventMutex);-
538 }
never executed: end of block
else {
0
539 sendWindowSystemEvents(flags);-
540 }
never executed: end of block
0
541 return
never executed: return QWindowSystemInterfacePrivate::eventAccepted.load() > 0;
QWindowSystemInterfacePrivate::eventAccepted.load() > 0;
never executed: return QWindowSystemInterfacePrivate::eventAccepted.load() > 0;
0
542}-
543-
544bool QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)-
545{-
546 int nevents = 0;-
547-
548 while (QWindowSystemInterfacePrivate::windowSystemEventsQueued()
QWindowSystemI...EventsQueued()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
549 QWindowSystemInterfacePrivate::WindowSystemEvent *event =-
550 (
(flags & QEven...erInputEvents)Description
TRUEnever evaluated
FALSEnever evaluated
flags & QEventLoop::ExcludeUserInputEvents)
(flags & QEven...erInputEvents)Description
TRUEnever evaluated
FALSEnever evaluated
?
0
551 QWindowSystemInterfacePrivate::getNonUserInputWindowSystemEvent() :-
552 QWindowSystemInterfacePrivate::getWindowSystemEvent();-
553 if (!event
!eventDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
554 break;
never executed: break;
0
555-
556 if (QWindowSystemInterfacePrivate::eventHandler
QWindowSystemI...::eventHandlerDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
557 if (QWindowSystemInterfacePrivate::eventHandler->sendEvent(event)
QWindowSystemI...ndEvent(event)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
558 nevents++;
never executed: nevents++;
0
559 }
never executed: end of block
else {
0
560 nevents++;-
561 QGuiApplicationPrivate::processWindowSystemEvent(event);-
562 }
never executed: end of block
0
563-
564-
565-
566-
567 if (event->type != QWindowSystemInterfacePrivate::FlushEvents
event->type !=...e::FlushEventsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
568 QWindowSystemInterfacePrivate::eventAccepted.store(event->eventAccepted);
never executed: QWindowSystemInterfacePrivate::eventAccepted.store(event->eventAccepted);
0
569-
570 delete event;-
571 }
never executed: end of block
0
572-
573 return
never executed: return (nevents > 0);
(nevents > 0);
never executed: return (nevents > 0);
0
574}-
575-
576void QWindowSystemInterfacePrivate::installWindowSystemEventHandler(QWindowSystemEventHandler *handler)-
577{-
578 if (!eventHandler
!eventHandlerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
579 eventHandler = handler;
never executed: eventHandler = handler;
0
580}
never executed: end of block
0
581-
582void QWindowSystemInterfacePrivate::removeWindowSystemEventhandler(QWindowSystemEventHandler *handler)-
583{-
584 if (eventHandler == handler
eventHandler == handlerDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
585 eventHandler = 0;
never executed: eventHandler = 0;
0
586}
never executed: end of block
0
587-
588void QWindowSystemInterface::setSynchronousWindowSystemEvents(bool enable)-
589{-
590 QWindowSystemInterfacePrivate::synchronousWindowSystemEvents = enable;-
591}
never executed: end of block
0
592-
593int QWindowSystemInterface::windowSystemEventsQueued()-
594{-
595 return
never executed: return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
QWindowSystemInterfacePrivate::windowSystemEventsQueued();
never executed: return QWindowSystemInterfacePrivate::windowSystemEventsQueued();
0
596}-
597-
598-
599QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)-
600{-
601 return
never executed: return QGuiApplicationPrivate::processDrag(w, dropData, QHighDpi::fromNativeLocalPosition(p, w) ,supportedActions);
QGuiApplicationPrivate::processDrag(w, dropData, QHighDpi::fromNativeLocalPosition(p, w) ,supportedActions);
never executed: return QGuiApplicationPrivate::processDrag(w, dropData, QHighDpi::fromNativeLocalPosition(p, w) ,supportedActions);
0
602}-
603-
604QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions)-
605{-
606 return
never executed: return QGuiApplicationPrivate::processDrop(w, dropData, QHighDpi::fromNativeLocalPosition(p, w),supportedActions);
QGuiApplicationPrivate::processDrop(w, dropData, QHighDpi::fromNativeLocalPosition(p, w),supportedActions);
never executed: return QGuiApplicationPrivate::processDrop(w, dropData, QHighDpi::fromNativeLocalPosition(p, w),supportedActions);
0
607}-
608bool QWindowSystemInterface::handleNativeEvent(QWindow *window, const QByteArray &eventType, void *message, long *result)-
609{-
610 return
never executed: return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
never executed: return QGuiApplicationPrivate::processNativeEvent(window, eventType, message, result);
0
611}-
612-
613void QWindowSystemInterface::handleFileOpenEvent(const QString& fileName)-
614{-
615 QWindowSystemInterfacePrivate::FileOpenEvent e(fileName);-
616 QGuiApplicationPrivate::processWindowSystemEvent(&e);-
617}
never executed: end of block
0
618-
619void QWindowSystemInterface::handleFileOpenEvent(const QUrl &url)-
620{-
621 QWindowSystemInterfacePrivate::FileOpenEvent e(url);-
622 QGuiApplicationPrivate::processWindowSystemEvent(&e);-
623}
never executed: end of block
0
624-
625void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, const QPointF &local, const QPointF &global,-
626 int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt,-
627 qreal tangentialPressure, qreal rotation, int z, qint64 uid,-
628 Qt::KeyboardModifiers modifiers)-
629{-
630 QWindowSystemInterfacePrivate::TabletEvent *e =-
631 new QWindowSystemInterfacePrivate::TabletEvent(w,timestamp,-
632 QHighDpi::fromNativeLocalPosition(local, w),-
633 QHighDpi::fromNativePixels(global, w),-
634 device, pointerType, buttons, pressure,-
635 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);-
636 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
637}
never executed: end of block
0
638-
639void QWindowSystemInterface::handleTabletEvent(QWindow *w, const QPointF &local, const QPointF &global,-
640 int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt,-
641 qreal tangentialPressure, qreal rotation, int z, qint64 uid,-
642 Qt::KeyboardModifiers modifiers)-
643{-
644 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
645 handleTabletEvent(w, time, local, global, device, pointerType, buttons, pressure,-
646 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);-
647}
never executed: end of block
0
648-
649void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global,-
650 int device, int pointerType, qreal pressure, int xTilt, int yTilt,-
651 qreal tangentialPressure, qreal rotation, int z, qint64 uid,-
652 Qt::KeyboardModifiers modifiers)-
653{-
654 handleTabletEvent(w, timestamp, local, global, device, pointerType, (down ? Qt::LeftButton : Qt::NoButton), pressure,-
655 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);-
656}
never executed: end of block
0
657-
658void QWindowSystemInterface::handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global,-
659 int device, int pointerType, qreal pressure, int xTilt, int yTilt,-
660 qreal tangentialPressure, qreal rotation, int z, qint64 uid,-
661 Qt::KeyboardModifiers modifiers)-
662{-
663 handleTabletEvent(w, local, global, device, pointerType, (down ? Qt::LeftButton : Qt::NoButton), pressure,-
664 xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers);-
665}
never executed: end of block
0
666-
667void QWindowSystemInterface::handleTabletEnterProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid)-
668{-
669 QWindowSystemInterfacePrivate::TabletEnterProximityEvent *e =-
670 new QWindowSystemInterfacePrivate::TabletEnterProximityEvent(timestamp, device, pointerType, uid);-
671 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
672}
never executed: end of block
0
673-
674void QWindowSystemInterface::handleTabletEnterProximityEvent(int device, int pointerType, qint64 uid)-
675{-
676 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
677 handleTabletEnterProximityEvent(time, device, pointerType, uid);-
678}
never executed: end of block
0
679-
680void QWindowSystemInterface::handleTabletLeaveProximityEvent(ulong timestamp, int device, int pointerType, qint64 uid)-
681{-
682 QWindowSystemInterfacePrivate::TabletLeaveProximityEvent *e =-
683 new QWindowSystemInterfacePrivate::TabletLeaveProximityEvent(timestamp, device, pointerType, uid);-
684 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
685}
never executed: end of block
0
686-
687void QWindowSystemInterface::handleTabletLeaveProximityEvent(int device, int pointerType, qint64 uid)-
688{-
689 ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed();-
690 handleTabletLeaveProximityEvent(time, device, pointerType, uid);-
691}
never executed: end of block
0
692-
693-
694void QWindowSystemInterface::handleGestureEvent(QWindow *window, ulong timestamp, Qt::NativeGestureType type,-
695 QPointF &local, QPointF &global)-
696{-
697 QWindowSystemInterfacePrivate::GestureEvent *e =-
698 new QWindowSystemInterfacePrivate::GestureEvent(window, timestamp, type, local, global);-
699 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
700}
never executed: end of block
0
701-
702void QWindowSystemInterface::handleGestureEventWithRealValue(QWindow *window, ulong timestamp, Qt::NativeGestureType type,-
703 qreal value, QPointF &local, QPointF &global)-
704{-
705 QWindowSystemInterfacePrivate::GestureEvent *e =-
706 new QWindowSystemInterfacePrivate::GestureEvent(window, timestamp, type, local, global);-
707 e->realValue = value;-
708 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
709}
never executed: end of block
0
710-
711void QWindowSystemInterface::handleGestureEventWithSequenceIdAndValue(QWindow *window, ulong timestamp, Qt::NativeGestureType type,-
712 ulong sequenceId, quint64 value, QPointF &local, QPointF &global)-
713{-
714 QWindowSystemInterfacePrivate::GestureEvent *e =-
715 new QWindowSystemInterfacePrivate::GestureEvent(window, timestamp, type, local, global);-
716 e->sequenceId = sequenceId;-
717 e->intValue = value;-
718 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
719}
never executed: end of block
0
720-
721-
722void QWindowSystemInterface::handlePlatformPanelEvent(QWindow *w)-
723{-
724 QWindowSystemInterfacePrivate::PlatformPanelEvent *e =-
725 new QWindowSystemInterfacePrivate::PlatformPanelEvent(w);-
726 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
727}
never executed: end of block
0
728-
729-
730void QWindowSystemInterface::handleContextMenuEvent(QWindow *w, bool mouseTriggered,-
731 const QPoint &pos, const QPoint &globalPos,-
732 Qt::KeyboardModifiers modifiers)-
733{-
734 QWindowSystemInterfacePrivate::ContextMenuEvent *e =-
735 new QWindowSystemInterfacePrivate::ContextMenuEvent(w, mouseTriggered, pos,-
736 globalPos, modifiers);-
737 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
738}
never executed: end of block
0
739-
740-
741-
742void QWindowSystemInterface::handleEnterWhatsThisEvent()-
743{-
744 QWindowSystemInterfacePrivate::WindowSystemEvent *e =-
745 new QWindowSystemInterfacePrivate::WindowSystemEvent(QWindowSystemInterfacePrivate::EnterWhatsThisMode);-
746 QWindowSystemInterfacePrivate::handleWindowSystemEvent(e);-
747}
never executed: end of block
0
748-
749-
750-
751__attribute__((visibility("default"))) QDebug operator<<(QDebug dbg, const QWindowSystemInterface::TouchPoint &p)-
752{-
753 QDebugStateSaver saver(dbg);-
754 dbg.nospace() << "TouchPoint(" << p.id << " @" << p.area << " normalized " << p.normalPosition-
755 << " press " << p.pressure << " vel " << p.velocity << " state " << (int)p.state;-
756 return
never executed: return dbg;
dbg;
never executed: return dbg;
0
757}-
758-
759-
760-
761-
762-
763__attribute__((visibility("default"))) void qt_handleMouseEvent(QWindow *w, const QPointF &local, const QPointF &global, Qt::MouseButtons b, Qt::KeyboardModifiers mods, int timestamp)-
764{-
765 bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;-
766 QWindowSystemInterface::setSynchronousWindowSystemEvents(true);-
767 const qreal factor = QHighDpiScaling::factor(w);-
768 QWindowSystemInterface::handleMouseEvent(w, timestamp, local * factor,-
769 global * factor, b, mods);-
770 QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);-
771}
never executed: end of block
0
772-
773__attribute__((visibility("default"))) void qt_handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1)-
774{-
775 bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;-
776 QWindowSystemInterface::setSynchronousWindowSystemEvents(true);-
777 QWindowSystemInterface::handleKeyEvent(w, t, k, mods, text, autorep, count);-
778 QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);-
779}
never executed: end of block
0
780-
781__attribute__((visibility("default"))) bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1)-
782{-
783 QGuiApplicationPrivate::modifier_buttons = mods;-
784-
785 QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count);-
786 qevent.setTimestamp(timestamp);-
787-
788 QShortcutMap &shortcutMap = QGuiApplicationPrivate::instance()->shortcutMap;-
789 if (shortcutMap.state() == QKeySequence::NoMatch
shortcutMap.st...uence::NoMatchDescription
TRUEnever evaluated
FALSEnever evaluated
) {
0
790-
791 QCoreApplication::sendEvent(o, &qevent);-
792 if (qevent.isAccepted()
qevent.isAccepted()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
793 return
never executed: return false;
false;
never executed: return false;
0
794 }
never executed: end of block
0
795-
796-
797 return
never executed: return shortcutMap.tryShortcut(&qevent);
shortcutMap.tryShortcut(&qevent);
never executed: return shortcutMap.tryShortcut(&qevent);
0
798}-
799-
800__attribute__((visibility("default"))) void qt_handleTouchEvent(QWindow *w, QTouchDevice *device,-
801 const QList<QTouchEvent::TouchPoint> &points,-
802 Qt::KeyboardModifiers mods = Qt::NoModifier)-
803{-
804 bool wasSynchronous = QWindowSystemInterfacePrivate::synchronousWindowSystemEvents;-
805 QWindowSystemInterface::setSynchronousWindowSystemEvents(true);-
806 QWindowSystemInterface::handleTouchEvent(w, device,-
807 QWindowSystemInterfacePrivate::toNativeTouchPoints(points, w), mods);-
808 QWindowSystemInterface::setSynchronousWindowSystemEvents(wasSynchronous);-
809}
never executed: end of block
0
810-
811QWindowSystemEventHandler::~QWindowSystemEventHandler()-
812{-
813 QWindowSystemInterfacePrivate::removeWindowSystemEventhandler(this);-
814}
never executed: end of block
0
815-
816bool QWindowSystemEventHandler::sendEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e)-
817{-
818 QGuiApplicationPrivate::processWindowSystemEvent(e);-
819 return
never executed: return true;
true;
never executed: return true;
0
820}-
821-
822QWindowSystemInterfacePrivate::WheelEvent::WheelEvent(QWindow *w, ulong time, const QPointF &local, const QPointF &global, QPoint pixelD,-
823 QPoint angleD, int qt4D, Qt::Orientation qt4O, Qt::KeyboardModifiers mods, Qt::ScrollPhase phase, Qt::MouseEventSource src, bool inverted)-
824 : InputEvent(w, time, Wheel, mods), pixelDelta(pixelD), angleDelta(angleD), qt4Delta(qt4D),-
825 qt4Orientation(qt4O), localPos(local), globalPos(global), phase(phase), source(src), inverted(inverted)-
826{-
827}
never executed: end of block
0
828-
829void QWindowSystemInterfacePrivate::TabletEvent::setPlatformSynthesizesMouse(bool v)-
830{-
831 platformSynthesizesMouse = v;-
832}
never executed: end of block
0
833-
834-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9