summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguifunctions_wince.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-01 12:12:30 (GMT)
committerJoerg Bornemann <joerg.bornemann@nokia.com>2009-10-01 12:14:55 (GMT)
commit9a2fe76443e814c221f308f8fe37ef6fcccbcf74 (patch)
tree8a8d1576bb07252ceba54508632d78a3e7e707c2 /src/gui/kernel/qguifunctions_wince.cpp
parentb718b80cd94063b491ba7695ccd2902c2819141b (diff)
downloadQt-9a2fe76443e814c221f308f8fe37ef6fcccbcf74.zip
Qt-9a2fe76443e814c221f308f8fe37ef6fcccbcf74.tar.gz
Qt-9a2fe76443e814c221f308f8fe37ef6fcccbcf74.tar.bz2
fix minimizing for Windows CE and Windows mobile
Task-number: QT-2243 Reviewed-by: thartman
Diffstat (limited to 'src/gui/kernel/qguifunctions_wince.cpp')
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index 048780e..58e12ee 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -329,17 +329,14 @@ void qt_wince_maximize(QWidget *widget)
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
+ if (!IsWindowVisible(hwnd)) {
+ // Hack for an initial showMinimized.
+ // Without it, our widget doesn't appear in the task bar.
+ ShowWindow(hwnd, SW_SHOW);
+ }
ShowWindow(hwnd, SW_MINIMIZE);
#endif
}