Without a call to QWindowSystemInterface::handleWindowActivated() or
QPlatformWindow::requestWindowActivated() QGuiApplication's
activeWindow() and focusWindow() will return 0 all the time, and this
breaks key event delivery when key events are received not from a
windowing system but directly from e.g. evdev. In such cases the only
choice is to send the event to the active window but if there isn't
one the event will be lost.
These platforms will have one fullscreen window at a time so marking
it the active one should be a safe assumption.
Change-Id: Ia6f0e9f021fbd61bbd368ddc46f8a13fccda1c2f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
#ifdef QEGL_EXTRA_DEBUG
qWarning("QEglIntegration::createPlatformWindow %p\n",window);
#endif
- return new QEglFSWindow(window);
+ QPlatformWindow *w = new QEglFSWindow(window);
+ w->requestActivateWindow();
+ return w;
}
QPlatformWindow *QMinimalIntegration::createPlatformWindow(QWindow *window) const
{
Q_UNUSED(window);
- return new QPlatformWindow(window);
+ QPlatformWindow *w = new QPlatformWindow(window);
+ w->requestActivateWindow();
+ return w;
}
QPlatformBackingStore *QMinimalIntegration::createPlatformBackingStore(QWindow *window) const