summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-10 14:01:20 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-09-10 15:50:37 (GMT)
commitd0b1717877c22082e6bfb518c760fe9f293a52e2 (patch)
tree91d2ccda3908ea4d602c9d2dda15b8eee33da673 /src/gui
parenta0529d55f0c1fb44e4c759b1d25fe7a095cdfc54 (diff)
downloadQt-d0b1717877c22082e6bfb518c760fe9f293a52e2.zip
Qt-d0b1717877c22082e6bfb518c760fe9f293a52e2.tar.gz
Qt-d0b1717877c22082e6bfb518c760fe9f293a52e2.tar.bz2
restoring a minimized window on Windows CE didn't work
After restoring a minimized window we only saw the window decoration. All content was missing. That's because we don't get a WM_SIZE message for restoring the window. We must react on WM_ACTIVATE in this case. This fixes the issue for Windows mobile too. Task-number: 260702 Reviewed-by: thartman Conflicts: src/gui/kernel/qguifunctions_wince.cpp
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qapplication_win.cpp8
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp13
2 files changed, 14 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 99baada..2b1aaf5 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2028,8 +2028,12 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// where it got it from; it would simply get a 0 value as the old focus widget.
#ifdef Q_WS_WINCE
{
- if (widget->windowState() & Qt::WindowMinimized)
- widget->dataPtr()->window_state &= ~Qt::WindowMinimized;
+ if (widget->windowState() & Qt::WindowMinimized) {
+ if (widget->windowState() & Qt::WindowMaximized)
+ widget->showMaximized();
+ else
+ widget->show();
+ }
#else
if (!(widget->windowState() & Qt::WindowMinimized)) {
#endif
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index a6b8502..048780e 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -327,20 +327,23 @@ void qt_wince_maximize(QWidget *widget)
}
}
-void qt_wince_minimize(HWND hwnd) {
-
- uint exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
- uint style = GetWindowLong(hwnd, GWL_STYLE);
+void qt_wince_minimize(HWND hwnd)
+{
+ uint exstyle = GetWindowLongW(hwnd, GWL_EXSTYLE);
+ uint style = GetWindowLongW(hwnd, GWL_STYLE);
RECT rect;
RECT crect = {0,0,0,0};
GetWindowRect(hwnd, &rect);
AdjustWindowRectEx(&crect, style & ~WS_OVERLAPPED, FALSE, exstyle);
MoveWindow(hwnd, rect.left - crect.left, rect.top - crect.top, 0, 0, true);
SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong (hwnd, GWL_EXSTYLE) | WS_EX_NODRAG);
+#ifdef Q_OS_WINCE_WM
ShowWindow(hwnd, SW_HIDE);
+#else
+ ShowWindow(hwnd, SW_MINIMIZE);
+#endif
}
-
void qt_wince_hide_taskbar(HWND hwnd) {
if (ptrAygFullScreen)
ptrAygFullScreen(hwnd, SHFS_HIDETASKBAR | SHFS_HIDESIPBUTTON | SHFS_HIDESTARTICON);