iOS: only skip activating the most simple popup types

The current approach of not activating transient windows with the
popup flag set was found to be too restrictive, as it would
e.g stop transient dialogs from being able to contain editable
controls.

This patch will restrict the number of popup types that we
skip activation for to only contain a few subtypes.

Task-number: QTBUG-41613
Change-Id: I381a5a79fb4f7082da18a6b4e06a7255ff400b1a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
bb10
Richard Moe Gustavsen 2014-11-24 17:12:57 +01:00
parent cf8dc020ff
commit a7dcc661d5
1 changed files with 4 additions and 3 deletions

View File

@ -145,9 +145,10 @@ void QIOSWindow::setVisible(bool visible)
bool QIOSWindow::shouldAutoActivateWindow() const
{
// We don't want to do automatic window activation for popup windows
// (including Tool, ToolTip and SplashScreen windows), unless they
// are standalone (no parent/transient parent), and hence not active.
return !(window()->type() & Qt::Popup) || !window()->isActive();
// that are unlikely to contain editable controls (to avoid hiding
// the keyboard while the popup is showing)
const Qt::WindowType type = window()->type();
return (type != Qt::Popup && type != Qt::ToolTip) || !window()->isActive();
}
void QIOSWindow::setOpacity(qreal level)