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/eglfs | |
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/eglfs')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.cpp | 7 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsintegration.h | 3 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsscreen.cpp | 17 | ||||
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfsscreen.h | 1 |
4 files changed, 25 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp index 8a526dbff5..9f8c0747df 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp +++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp @@ -165,7 +165,7 @@ void QEglFSIntegration::initialize() qFatal("EGL error"); } - mScreen = new QEglFSScreen(mDisplay); + mScreen = createScreen(); screenAdded(mScreen); mInputContext = QPlatformInputContextFactory::create(); @@ -173,6 +173,11 @@ void QEglFSIntegration::initialize() createInputHandlers(); } +QEglFSScreen *QEglFSIntegration::createScreen() const +{ + return new QEglFSScreen(mDisplay); +} + QVariant QEglFSIntegration::styleHint(QPlatformIntegration::StyleHint hint) const { switch (hint) diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.h b/src/plugins/platforms/eglfs/qeglfsintegration.h index a6fcfc8427..f685eec2d4 100644 --- a/src/plugins/platforms/eglfs/qeglfsintegration.h +++ b/src/plugins/platforms/eglfs/qeglfsintegration.h @@ -86,6 +86,9 @@ public: QPlatformInputContext *inputContext() const { return mInputContext; } +protected: + virtual QEglFSScreen *createScreen() const; + private: void createInputHandlers(); diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp index 3f92d60aa2..758b461b3f 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp @@ -126,26 +126,34 @@ void QEglFSScreen::setPrimarySurface(EGLSurface surface) void QEglFSScreen::addWindow(QEglFSWindow *window) { - if (!m_windows.contains(window)) + if (!m_windows.contains(window)) { m_windows.append(window); + topWindowChanged(window); + } } void QEglFSScreen::removeWindow(QEglFSWindow *window) { m_windows.removeOne(window); + if (!m_windows.isEmpty()) + topWindowChanged(m_windows.last()); } void QEglFSScreen::moveToTop(QEglFSWindow *window) { m_windows.removeOne(window); m_windows.append(window); + topWindowChanged(window); } void QEglFSScreen::changeWindowIndex(QEglFSWindow *window, int newIdx) { int idx = m_windows.indexOf(window); - if (idx != -1 && idx != newIdx) + if (idx != -1 && idx != newIdx) { m_windows.move(idx, newIdx); + if (newIdx == m_windows.size() - 1) + topWindowChanged(m_windows.last()); + } } QEglFSWindow *QEglFSScreen::rootWindow() @@ -157,4 +165,9 @@ QEglFSWindow *QEglFSScreen::rootWindow() return 0; } +void QEglFSScreen::topWindowChanged(QPlatformWindow *window) +{ + Q_UNUSED(window); +} + QT_END_NAMESPACE diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.h b/src/plugins/platforms/eglfs/qeglfsscreen.h index 578a6cf20d..11d66b7e0f 100644 --- a/src/plugins/platforms/eglfs/qeglfsscreen.h +++ b/src/plugins/platforms/eglfs/qeglfsscreen.h @@ -85,6 +85,7 @@ public: protected: void setPrimarySurface(EGLSurface surface); + virtual void topWindowChanged(QPlatformWindow *window); private: friend class QEglFSWindow; |