summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/winrt
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-09-21 10:23:29 +0200
committerLiang Qi <liang.qi@qt.io>2016-09-21 11:57:52 +0200
commit7555a925816e3244073803f0adc4d44640f5ac1d (patch)
treef6f11015ae7387b50eaa76aa2c80ff273093b188 /src/plugins/platforms/winrt
parent31c251765db45a068f1268027e5dd600151af1e5 (diff)
parent8d64d1e0c3f7ebcee859e8b5f40aa27a8df86351 (diff)
Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure. This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with apple SDK", 2c9d15d7, because it breaks iOS build with new configure system. Conflicts: mkspecs/features/default_pre.prf mkspecs/features/mac/toolchain.prf mkspecs/features/toolchain.prf src/dbus/qdbusconnection.cpp src/plugins/sqldrivers/mysql/qsql_mysql.cpp src/sql/drivers/mysql/qsql_mysql.cpp src/widgets/widgets/qmenubar.cpp src/widgets/widgets/qmenubar_p.h tools/configure/configureapp.cpp tools/configure/environment.cpp tools/configure/environment.h Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
Diffstat (limited to 'src/plugins/platforms/winrt')
-rw-r--r--src/plugins/platforms/winrt/qwinrtscreen.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/platforms/winrt/qwinrtscreen.cpp b/src/plugins/platforms/winrt/qwinrtscreen.cpp
index 9236de58a1..e8e869c04f 100644
--- a/src/plugins/platforms/winrt/qwinrtscreen.cpp
+++ b/src/plugins/platforms/winrt/qwinrtscreen.cpp
@@ -828,7 +828,7 @@ void QWinRTScreen::addWindow(QWindow *window)
}
handleExpose();
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
QWinRTDrag::instance()->setDropTarget(window);
@@ -848,7 +848,7 @@ void QWinRTScreen::removeWindow(QWindow *window)
if (wasTopWindow && type != Qt::Popup && type != Qt::ToolTip && type != Qt::Tool)
QWindowSystemInterface::handleWindowActivated(Q_NULLPTR, Qt::OtherFocusReason);
handleExpose();
- QWindowSystemInterface::flushWindowSystemEvents();
+ QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents);
#if _MSC_VER >= 1900 && !defined(QT_NO_DRAGANDDROP)
if (wasTopWindow)
QWinRTDrag::instance()->setDropTarget(topWindow());
@@ -1157,6 +1157,12 @@ HRESULT QWinRTScreen::onPointerUpdated(ICoreWindow *, IPointerEventArgs *args)
properties->get_IsLeftButtonPressed(&isPressed); // IsInContact not reliable on phone
#endif
+ // Devices like the Hololens set a static pressure of 0.5 independent
+ // of the pressed state. In those cases we need to synthesize the
+ // pressure value. To our knowledge this does not apply to pens
+ if (pointerDeviceType == PointerDeviceType_Touch && pressure == 0.5f)
+ pressure = isPressed ? 1. : 0.;
+
const QRectF areaRect(area.X * d->scaleFactor, area.Y * d->scaleFactor,
area.Width * d->scaleFactor, area.Height * d->scaleFactor);