Fix FullScreen for Windows CE

For Windows CE the taskbar needs to be hidden
manually.

Change-Id: Ife69a2a91457ba0c162e4e1be88f87ad22c61190
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
This commit is contained in:
Andreas Holzammer 2012-08-02 09:57:15 +02:00 committed by Qt by Nokia
parent 3d0af143ca
commit 1e9d9e2044
2 changed files with 26 additions and 0 deletions

View File

@ -703,6 +703,9 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
#ifdef QT_OPENGL_ES_2
, m_eglSurface(0)
#endif
#ifdef Q_OS_WINCE
, m_previouslyHidden(false)
#endif
{
if (aWindow->surfaceType() == QWindow::OpenGLSurface)
setFlag(OpenGLSurface);
@ -744,6 +747,14 @@ void QWindowsWindow::destroyWindow()
eglDestroySurface(m_staticEglContext->display(), m_eglSurface);
m_eglSurface = 0;
}
#endif
#ifdef Q_OS_WINCE
if ((m_windowState & Qt::WindowFullScreen) && !m_previouslyHidden) {
HWND handle = FindWindow(L"HHTaskBar", L"");
if (handle) {
ShowWindow(handle, SW_SHOW);
}
}
#endif
if (m_data.hwnd != GetDesktopWindow())
DestroyWindow(m_data.hwnd);
@ -1210,6 +1221,18 @@ void QWindowsWindow::setWindowState_sys(Qt::WindowState newState)
}
if ((oldState == Qt::WindowFullScreen) != (newState == Qt::WindowFullScreen)) {
#ifdef Q_OS_WINCE
HWND handle = FindWindow(L"HHTaskBar", L"");
if (handle) {
if (newState == Qt::WindowFullScreen) {
BOOL hidden = ShowWindow(handle, SW_HIDE);
if (!hidden)
m_previouslyHidden = true;
} else if (!m_previouslyHidden){
ShowWindow(handle, SW_SHOW);
}
}
#endif
if (newState == Qt::WindowFullScreen) {
#ifndef Q_FLATTEN_EXPOSE
UINT newStyle = WS_CLIPCHILDREN | WS_CLIPSIBLINGS | WS_POPUP;

View File

@ -270,6 +270,9 @@ private:
EGLSurface m_eglSurface;
QSharedPointer<QWindowsEGLStaticContext> m_staticEglContext;
#endif
#ifdef Q_OS_WINCE
bool m_previouslyHidden;
#endif
};
// Conveniences for window frames.