iOS: set active window upon calls to requestActiveWindow
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>
Tue, 29 Oct 2013 13:11:33 +0000 (14:11 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 6 Nov 2013 19:50:09 +0000 (20:50 +0100)
commit6272a816d192b3c9b363164216bfd7a13e7370e9
tree0c6792815f04cbb38243d80c1a322cbb8ce10948
parent1d54a502dd302da0b3676cfc7f35d2aa92610cf2
iOS: set active window upon calls to requestActiveWindow

We did not do this from before. Instead we would activate
the window when it's view became first responder. And this
would happen when the input panel was told to open.
That behavior is a fragile, since other layers higher
up (qml) would not open the input panel unless the window
was active, which also makes sense. A classic chicken and
egg problem.

So to play more along with how Qt is expected to work, we
change behavior to instead activate the window directly
when requested to do so (which also includes when the user
touches the window directly). This will also work better
for "keyboard" events like Key_VolumeUp, once implemented.

The down side is that Qt will give focus to widgets/items
(and as such, open the keyboard) whenever you touch the
window. But that is easier to fix, and will be dealt with
in later patches.

Change-Id: I9bbeb0205e7ea3c5079100c07e40ddb1c60b476b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
src/plugins/platforms/ios/qioswindow.mm