From 747e569597348b47a9d2cbb469eb5c4af87f7ff2 Mon Sep 17 00:00:00 2001 From: Pier Luigi Fiorini Date: Wed, 14 Dec 2016 08:38:04 +0100 Subject: eglfs: Activate the window on the primary screen Having the window on the last screen focused is inconvenient since the main application UI is likely to be shown on the primary screen. Change-Id: I2e7945a903cb432d3428c773ac89c662374632c9 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/api/qeglfsintegration.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/eglfs/api/qeglfsintegration.cpp') diff --git a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp index 190f5a80d0..0aa7a65276 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsintegration.cpp @@ -203,8 +203,11 @@ QPlatformWindow *QEglFSIntegration::createPlatformWindow(QWindow *window) const QWindowSystemInterface::flushWindowSystemEvents(QEventLoop::ExcludeUserInputEvents); QEglFSWindow *w = qt_egl_device_integration()->createWindow(window); w->create(); - if (window->type() != Qt::ToolTip) + + // Activate only the window for the primary screen to make input work + if (window->type() != Qt::ToolTip && window->screen() == QGuiApplication::primaryScreen()) w->requestActivateWindow(); + return w; } -- cgit v1.2.3