From 8d83562c1f4e37875d00761219968431e18a7704 Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Fri, 4 Apr 2014 18:06:50 +0200 Subject: QNX: Surpress manual window activation during showFullScreen When a window is shown, libscreen will give it keyboard focus. Requesting the activation right after the window is created (and before libscreen activated the window) causes problems on some devices e.g. Q10. Change-Id: I29f7a38990ea4259a8b0c6624f70e31d7291af00 Reviewed-by: Sergio Ahumada --- src/gui/kernel/qwindow.cpp | 3 +++ src/widgets/kernel/qwidget.cpp | 3 +++ 2 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 13da58e391..6dcc3df166 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1751,7 +1751,10 @@ void QWindow::showFullScreen() { setWindowState(Qt::WindowFullScreen); setVisible(true); +#if !defined Q_OS_QNX // On QNX this window will be activated anyway from libscreen + // activating it here before libscreen activates it causes problems requestActivate(); +#endif } /*! diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 03655639d5..5bcec13238 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -2837,7 +2837,10 @@ void QWidget::showFullScreen() setWindowState((windowState() & ~(Qt::WindowMinimized | Qt::WindowMaximized)) | Qt::WindowFullScreen); setVisible(true); +#if !defined Q_OS_QNX // On QNX this window will be activated anyway from libscreen + // activating it here before libscreen activates it causes problems activateWindow(); +#endif } /*! -- cgit v1.2.3