summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.mm
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-01-19 13:49:52 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-01-21 11:10:14 +0100
commitb6191b16d41459ed73cea738dfaf8e25e81ae22b (patch)
tree6ad0952af507bf1ab8df9612023d6e224db8d7e2 /src/plugins/platforms/ios/qiosinputcontext.mm
parentb2883a6acc7a8d8372a815cc91dd1a8449f25723 (diff)
parent9087df6bd2dd5198ccf101a237aadee331e51ec3 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: src/corelib/global/global.pri src/corelib/global/qcompilerdetection.h src/corelib/global/qglobal.h src/corelib/tools/qdatetime.cpp src/plugins/platforms/xcb/qxcbscreen.h src/plugins/platforms/xcb/qxcbwindow.h src/widgets/dialogs/qcolordialog.cpp src/widgets/dialogs/qcolordialog_p.h tools/configure/configureapp.cpp Change-Id: Ie9d6e9df13e570da0a90a67745a0d05f46c532af
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm
index 76c02d939f..6e56f47954 100644
--- a/src/plugins/platforms/ios/qiosinputcontext.mm
+++ b/src/plugins/platforms/ios/qiosinputcontext.mm
@@ -75,9 +75,7 @@ static QUIView *focusView()
- (id)initWithQIOSInputContext:(QIOSInputContext *)context
{
- id originalSelf = self;
if (self = [super initWithTarget:self action:@selector(gestureStateChanged:)]) {
- Q_ASSERT(self == originalSelf);
m_context = context;
@@ -505,7 +503,22 @@ void QIOSInputContext::scroll(int y)
[rootView.layer addAnimation:animation forKey:@"AnimateSubLayerTransform"];
rootView.layer.sublayerTransform = translationTransform;
- [rootView.qtViewController updateProperties];
+ bool keyboardScrollIsActive = y != 0;
+
+ // Raise all known windows to above the status-bar if we're scrolling the screen,
+ // while keeping the relative window level between the windows the same.
+ NSArray *applicationWindows = [[UIApplication sharedApplication] windows];
+ static QHash<UIWindow *, UIWindowLevel> originalWindowLevels;
+ for (UIWindow *window in applicationWindows) {
+ if (keyboardScrollIsActive && !originalWindowLevels.contains(window))
+ originalWindowLevels.insert(window, window.windowLevel);
+
+ UIWindowLevel windowLevelAdjustment = keyboardScrollIsActive ? UIWindowLevelStatusBar : 0;
+ window.windowLevel = originalWindowLevels.value(window) + windowLevelAdjustment;
+
+ if (!keyboardScrollIsActive)
+ originalWindowLevels.remove(window);
+ }
}
completion:^(BOOL){
if (self) {