summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosglobal.h
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-16 15:37:48 +0200
committerTor Arne Vestbø <tor.arne.vestbo@digia.com>2014-10-28 13:05:05 +0100
commit50cadb87e8f7f8a9e064c86753f348a1e0f9c485 (patch)
tree3c9fc5dcdc6797bcff97919f860e0dd107ccd001 /src/plugins/platforms/ios/qiosglobal.h
parent5a4fad14797d7cb0f7a65d5c546a0006475757e1 (diff)
iOS: Detect window deactivation without waiting for next runloop iteration
Since we know and control whether or not we are making a new QUIView first responder, we can take not of this at that point, and use that information when another view is resigning first responder. Change-Id: I508720d418c92dc8a8011b489cc5cace8fc82633 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosglobal.h')
-rw-r--r--src/plugins/platforms/ios/qiosglobal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosglobal.h b/src/plugins/platforms/ios/qiosglobal.h
index fccb051645..dbedba7e85 100644
--- a/src/plugins/platforms/ios/qiosglobal.h
+++ b/src/plugins/platforms/ios/qiosglobal.h
@@ -71,4 +71,14 @@ QT_END_NAMESPACE
+(id)currentFirstResponder;
@end
+class FirstResponderCandidate : public QScopedValueRollback<UIResponder *>
+{
+public:
+ FirstResponderCandidate(UIResponder *);
+ static UIResponder *currentCandidate() { return s_firstResponderCandidate; }
+
+private:
+ static UIResponder *s_firstResponderCandidate;
+};
+
#endif // QIOSGLOBAL_H