QNX: Fix window focus problems when using QNX 6.5.0.
In blackberry, activation events come through the navigator, but we might not have a navigator. Change-Id: I0d9e1a08336aa403035fdf00be46d839a83f4b58 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
parent
bc6228c3f4
commit
779ef8bb7e
@ -518,4 +518,10 @@ QQnxScreen *QQnxIntegration::primaryDisplay() const
|
|||||||
return m_screens.first();
|
return m_screens.first();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QQnxIntegration::supportsNavigatorEvents() const
|
||||||
|
{
|
||||||
|
// If QQNX_PPS or Q_OS_BLACKBERRY is defined then we have navigator
|
||||||
|
return m_navigator != 0;
|
||||||
|
}
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
@ -98,6 +98,8 @@ public:
|
|||||||
|
|
||||||
void moveToScreen(QWindow *window, int screen);
|
void moveToScreen(QWindow *window, int screen);
|
||||||
|
|
||||||
|
bool supportsNavigatorEvents() const;
|
||||||
|
|
||||||
QAbstractEventDispatcher *guiThreadEventDispatcher() const;
|
QAbstractEventDispatcher *guiThreadEventDispatcher() const;
|
||||||
|
|
||||||
QPlatformFontDatabase *fontDatabase() const { return m_fontDatabase; }
|
QPlatformFontDatabase *fontDatabase() const { return m_fontDatabase; }
|
||||||
|
@ -276,6 +276,11 @@ void QQnxScreenEventHandler::handlePointerEvent(screen_event_t event)
|
|||||||
qScreenEventDebug() << Q_FUNC_INFO << "Qt enter, w=" << w;
|
qScreenEventDebug() << Q_FUNC_INFO << "Qt enter, w=" << w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we don't have a navigator, we don't get activation events.
|
||||||
|
if (buttonState && w && w != QGuiApplication::focusWindow() && !m_qnxIntegration->supportsNavigatorEvents())
|
||||||
|
QWindowSystemInterface::handleWindowActivated(w);
|
||||||
|
|
||||||
m_lastMouseWindow = qnxWindow;
|
m_lastMouseWindow = qnxWindow;
|
||||||
|
|
||||||
// Apply scaling to wheel delta and invert value for Qt. We'll probably want to scale
|
// Apply scaling to wheel delta and invert value for Qt. We'll probably want to scale
|
||||||
|
Loading…
x
Reference in New Issue
Block a user