diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-11 08:48:27 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2016-04-11 09:12:36 +0200 |
commit | f34e73a16a3d757057e007874cb5008f16e20f02 (patch) | |
tree | bcc228617cf240773fd09daac1a1a2614b552b68 /src/gui/kernel/qguiapplication.cpp | |
parent | 5380808453728a354ae28aae76e85ac448245cf1 (diff) | |
parent | b9d386f2ccd69c7f6a766a6d90a6024eeb48e90a (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
src/corelib/kernel/qobject.cpp
src/gui/painting/qpaintengine_raster.cpp
Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index c97d3bb61a..9f566213bc 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2300,9 +2300,17 @@ void QGuiApplicationPrivate::processTabletEvent(QWindowSystemInterfacePrivate::T e->device, e->pointerType, e->pressure, e->xTilt, e->yTilt, e->tangentialPressure, e->rotation, e->z, e->modifiers, e->uid, button, e->buttons); + ev.setAccepted(false); ev.setTimestamp(e->timestamp); QGuiApplication::sendSpontaneousEvent(window, &ev); pointData.state = e->buttons; + if (!ev.isAccepted() && !QWindowSystemInterfacePrivate::TabletEvent::platformSynthesizesMouse + && qApp->testAttribute(Qt::AA_SynthesizeMouseForUnhandledTabletEvents)) { + QWindowSystemInterfacePrivate::MouseEvent fake(window, e->timestamp, e->local, e->global, + e->buttons, e->modifiers, Qt::MouseEventSynthesizedByQt); + fake.flags |= QWindowSystemInterfacePrivate::WindowSystemEvent::Synthetic; + processMouseEvent(&fake); + } #else Q_UNUSED(e) #endif |