summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
diff options
context:
space:
mode:
authorJames McDonnell <jmcdonnell@blackberry.com>2017-11-21 14:18:21 -0500
committerRafael Roquetto <rafael@roquetto.com>2018-10-02 23:28:28 +0000
commit155ae07b7083cc7960f0f4425eb11849254d78ad (patch)
tree1ba5d73cd598c1909087937d10541d63b41de596 /src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
parenteafca2229b007f53685fabe9a6217f0eb4c8b67f (diff)
Add support for showWithoutActivating windows
Includes pop-up windows which are implicitly showWithoutActivating windows. The QNX platform code was allowing screen to activate these windows when they were shown. Add code to activate showWithoutActivating windows when they are first touched or clicked on. From there, screen handles activation as it does for any other window. Change-Id: If443676e497a97724e16037b34d3db1d7c335790 Reviewed-by: Dan Cape <dcape@qnx.com> Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io> Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
Diffstat (limited to 'src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp')
-rw-r--r--src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
index e4843cb438..f29e11489b 100644
--- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
+++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp
@@ -381,6 +381,8 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
if (m_lastGlobalMousePoint != globalPoint ||
m_lastLocalMousePoint != localPoint ||
m_lastButtonState != buttons) {
+ if (m_lastButtonState != 0 && buttons == 0)
+ (static_cast<QQnxWindow *>(w->handle()))->handleActivationEvent();
QWindowSystemInterface::handleMouseEvent(w, localPoint, globalPoint, buttons);
qScreenEventDebug() << "Qt mouse, w=" << w << ", (" << localPoint.x() << "," << localPoint.y() << "), b=" << static_cast<int>(buttons);
}
@@ -457,6 +459,9 @@ void QQnxScreenEventHandler::handleTouchEvent(screen_event_t event, int qnxType)
m_lastMouseWindow = qnxWindow;
if (w) {
+ if (qnxType == SCREEN_EVENT_MTOUCH_RELEASE)
+ (static_cast<QQnxWindow *>(w->handle()))->handleActivationEvent();
+
// get size of screen which contains window
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(w);
QSizeF screenSize = platformScreen->geometry().size();