summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/ios/qioswindow.h2
-rw-r--r--src/plugins/platforms/ios/qioswindow.mm18
2 files changed, 20 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qioswindow.h b/src/plugins/platforms/ios/qioswindow.h
index d16e17124d..4e1970d4d4 100644
--- a/src/plugins/platforms/ios/qioswindow.h
+++ b/src/plugins/platforms/ios/qioswindow.h
@@ -85,6 +85,8 @@ public:
void setGeometry(const QRect &rect);
void updateGeometry(const QRect &rect);
+ void setWindowState(Qt::WindowState state);
+
GLuint framebufferObject(const QIOSContext &context) const;
EAGLView *nativeView() const { return m_view; }
diff --git a/src/plugins/platforms/ios/qioswindow.mm b/src/plugins/platforms/ios/qioswindow.mm
index feabaeb47a..cccd5ab133 100644
--- a/src/plugins/platforms/ios/qioswindow.mm
+++ b/src/plugins/platforms/ios/qioswindow.mm
@@ -203,6 +203,8 @@ QIOSWindow::QIOSWindow(QWindow *window)
if ([uiApplication.delegate isMemberOfClass:[QIOSApplicationDelegate class]])
[uiApplication.delegate.window.rootViewController.view addSubview:m_view];
}
+
+ setWindowState(window->windowState());
}
QIOSWindow::~QIOSWindow()
@@ -235,6 +237,22 @@ void QIOSWindow::updateGeometry(const QRect &rect)
QWindowSystemInterface::handleGeometryChange(window(), rect);
}
+void QIOSWindow::setWindowState(Qt::WindowState state)
+{
+ // FIXME: Figure out where or how we should disable/enable the statusbar.
+ // Perhaps setting QWindow to maximized should also mean that we'll show
+ // the statusbar, and vice versa for fullscreen?
+
+ switch (state) {
+ case Qt::WindowMaximized:
+ case Qt::WindowFullScreen:
+ setGeometry(QRect(QPoint(0, 0), window()->screen()->availableSize()));
+ break;
+ default:
+ break;
+ }
+}
+
GLuint QIOSWindow::framebufferObject(const QIOSContext &context) const
{
static GLuint framebuffer = 0;