diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> | 2013-10-31 16:14:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 14:52:47 +0100 |
commit | 59569fd0202c52a16860fba5634e743286a19fd2 (patch) | |
tree | 88a7729833e0bc4020eeafb447864c2d61e28c82 /src/plugins/platforms/android/src/qandroidplatformintegration.cpp | |
parent | 45b10ee02af53b712feacdce1d5c86af5a4079ad (diff) |
Android: Differ between ShowMaximized and ShowFullScreen
The default is now ShowMaximized which behaves as it did before,
i.e. each window will fill the screen but the status bar will be
visible. Calling showFullScreen() explicitly will now hide the
status bar to maximize the amount of screen real estate occupied
by the application.
Task-number: QTBUG-33135
Change-Id: If0d0a2ab72f8026e76818290e2b953dbc0dec156
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Diffstat (limited to 'src/plugins/platforms/android/src/qandroidplatformintegration.cpp')
-rw-r--r-- | src/plugins/platforms/android/src/qandroidplatformintegration.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp index e48a3c9ebe..6d0ec306ab 100644 --- a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp @@ -61,6 +61,7 @@ # include "androidjnimenu.h" # include "qandroidopenglcontext.h" # include "qandroidopenglplatformwindow.h" +# include "qandroidopenglplatformscreen.h" # include "qeglfshooks.h" # include <QtGui/qopenglcontext.h> #endif @@ -141,7 +142,10 @@ QPlatformBackingStore *QAndroidPlatformIntegration::createPlatformBackingStore(Q QPlatformWindow *QAndroidPlatformIntegration::createPlatformWindow(QWindow *window) const { - return new QAndroidPlatformWindow(window); + QAndroidPlatformWindow *platformWindow = new QAndroidPlatformWindow(window); + platformWindow->setWindowState(window->windowState()); + + return platformWindow; } QAbstractEventDispatcher *QAndroidPlatformIntegration::createEventDispatcher() const @@ -154,6 +158,7 @@ QPlatformWindow *QAndroidPlatformIntegration::createPlatformWindow(QWindow *wind QAndroidOpenGLPlatformWindow *platformWindow = new QAndroidOpenGLPlatformWindow(window); platformWindow->create(); platformWindow->requestActivateWindow(); + platformWindow->setWindowState(window->windowState()); QtAndroidMenu::setActiveTopLevelWindow(window); return platformWindow; @@ -230,7 +235,7 @@ QPlatformServices *QAndroidPlatformIntegration::services() const QVariant QAndroidPlatformIntegration::styleHint(StyleHint hint) const { switch (hint) { - case ShowIsFullScreen: + case ShowIsMaximized: return true; default: return QPlatformIntegration::styleHint(hint); @@ -307,6 +312,11 @@ void QAndroidPlatformIntegration::setDisplayMetrics(int width, int height) m_defaultPhysicalSizeHeight = height; } +QEglFSScreen *QAndroidPlatformIntegration::createScreen() const +{ + return new QAndroidOpenGLPlatformScreen(display()); +} + #endif void QAndroidPlatformIntegration::pauseApp() |