diff options
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 49ff8bcb0d..59766d0bb2 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -133,11 +133,11 @@ void QWindowSystemInterface::handleWindowScreenChanged(QWindow *tlw, QScreen *sc QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } -void QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState) +void QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState newState, bool forcePropagate) { Q_ASSERT(QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ApplicationState)); QWindowSystemInterfacePrivate::ApplicationStateChangedEvent *e = - new QWindowSystemInterfacePrivate::ApplicationStateChangedEvent(newState); + new QWindowSystemInterfacePrivate::ApplicationStateChangedEvent(newState, forcePropagate); QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } @@ -493,17 +493,10 @@ void QWindowSystemInterface::handleScreenOrientationChange(QScreen *screen, Qt:: QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } -void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry) +void QWindowSystemInterface::handleScreenGeometryChange(QScreen *screen, const QRect &geometry, const QRect &availableGeometry) { QWindowSystemInterfacePrivate::ScreenGeometryEvent *e = - new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry); - QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); -} - -void QWindowSystemInterface::handleScreenAvailableGeometryChange(QScreen *screen, const QRect &availableGeometry) -{ - QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent *e = - new QWindowSystemInterfacePrivate::ScreenAvailableGeometryEvent(screen, availableGeometry); + new QWindowSystemInterfacePrivate::ScreenGeometryEvent(screen, geometry, availableGeometry); QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } @@ -629,24 +622,42 @@ void QWindowSystemInterface::handleFileOpenEvent(const QUrl &url) QGuiApplicationPrivate::processWindowSystemEvent(&e); } -void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global, - int device, int pointerType, qreal pressure, int xTilt, int yTilt, +void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, const QPointF &local, const QPointF &global, + int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers modifiers) { QWindowSystemInterfacePrivate::TabletEvent *e = - new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, down, local, global, device, pointerType, pressure, + new QWindowSystemInterfacePrivate::TabletEvent(w, timestamp, local, global, device, pointerType, buttons, pressure, xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); QWindowSystemInterfacePrivate::handleWindowSystemEvent(e); } +void QWindowSystemInterface::handleTabletEvent(QWindow *w, const QPointF &local, const QPointF &global, + int device, int pointerType, Qt::MouseButtons buttons, qreal pressure, int xTilt, int yTilt, + qreal tangentialPressure, qreal rotation, int z, qint64 uid, + Qt::KeyboardModifiers modifiers) +{ + ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed(); + handleTabletEvent(w, time, local, global, device, pointerType, buttons, pressure, + xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); +} + +void QWindowSystemInterface::handleTabletEvent(QWindow *w, ulong timestamp, bool down, const QPointF &local, const QPointF &global, + int device, int pointerType, qreal pressure, int xTilt, int yTilt, + qreal tangentialPressure, qreal rotation, int z, qint64 uid, + Qt::KeyboardModifiers modifiers) +{ + handleTabletEvent(w, timestamp, local, global, device, pointerType, (down ? Qt::LeftButton : Qt::NoButton), pressure, + xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); +} + void QWindowSystemInterface::handleTabletEvent(QWindow *w, bool down, const QPointF &local, const QPointF &global, int device, int pointerType, qreal pressure, int xTilt, int yTilt, qreal tangentialPressure, qreal rotation, int z, qint64 uid, Qt::KeyboardModifiers modifiers) { - ulong time = QWindowSystemInterfacePrivate::eventTime.elapsed(); - handleTabletEvent(w, time, down, local, global, device, pointerType, pressure, + handleTabletEvent(w, local, global, device, pointerType, (down ? Qt::LeftButton : Qt::NoButton), pressure, xTilt, yTilt, tangentialPressure, rotation, z, uid, modifiers); } |