Fix setting Qt::WA_ShowWithoutActivating on eglfs window

WebEngine HTML based popups depends on setting Qt::WA_ShowWithoutActivating,
to keep forwarding events to chromium event handling. This works well with xcb,
windows or coca windows backends, however was not respected on eglfs.

Add check before activating the window.

Task-number: QTBUG-69533
Change-Id: I66b249ec497af890c8a2228eee3bac3c806e77ed
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Michal Klocek 2019-04-12 17:06:25 +02:00 committed by Michal Klocek
parent 7ee449a186
commit e4d2c74aad

View File

@ -199,6 +199,10 @@ QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWindow *window) const
QEglFSWindow *w = qt_egl_device_integration()->createWindow(window);
w->create();
const auto showWithoutActivating = window->property("_q_showWithoutActivating");
if (showWithoutActivating.isValid() && showWithoutActivating.toBool())
return w;
// Activate only the window for the primary screen to make input work
if (window->type() != Qt::ToolTip && window->screen() == QGuiApplication::primaryScreen())
w->requestActivateWindow();