diff options
author | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-07-16 08:43:14 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@nokia.com> | 2010-07-16 09:40:48 (GMT) |
commit | ad4aff6e2d188d88a2c6b4b692932adb08491d22 (patch) | |
tree | d79908fc4f52b6417d29516bab96130ba3c1d859 /src/gui/kernel/qguifunctions_wince.cpp | |
parent | 2c1aafa47b8915ea8aae8da229d65086e42543b3 (diff) | |
download | Qt-ad4aff6e2d188d88a2c6b4b692932adb08491d22.zip Qt-ad4aff6e2d188d88a2c6b4b692932adb08491d22.tar.gz Qt-ad4aff6e2d188d88a2c6b4b692932adb08491d22.tar.bz2 |
Windows mobile: hide [X] button in task bar on unmaximize
When calling showNormal on a window that was maximized, we must remove
the [X] button from the task bar. But only if it was added by
qt_wince_maximize.
Task-number: QTBUG-8408
Reviewed-by: Martin Petersson
Diffstat (limited to 'src/gui/kernel/qguifunctions_wince.cpp')
-rw-r--r-- | src/gui/kernel/qguifunctions_wince.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp index bdaed65..377dfe3 100644 --- a/src/gui/kernel/qguifunctions_wince.cpp +++ b/src/gui/kernel/qguifunctions_wince.cpp @@ -76,6 +76,10 @@ struct AygSIPINFO #define SHIDIF_SIZEDLGFULLSCREEN 0x0004 #endif +#ifndef SHDB_HIDE +#define SHDB_HIDE 0x0002 +#endif + #ifndef SHFS_SHOWTASKBAR #define SHFS_SHOWTASKBAR 0x0001 #endif @@ -112,10 +116,12 @@ struct AygSIPINFO typedef BOOL (*AygInitDialog)(AygSHINITDLGINFO*); typedef BOOL (*AygFullScreen)(HWND, DWORD); typedef BOOL (*AygSHSipInfo)(UINT, UINT, PVOID, UINT); +typedef BOOL (*AygSHDoneButton)(HWND, DWORD); static AygInitDialog ptrAygInitDialog = 0; static AygFullScreen ptrAygFullScreen = 0; static AygSHSipInfo ptrAygSHSipInfo = 0; +static AygSHDoneButton ptrAygSHDoneButton = 0; static bool aygResolved = false; static void resolveAygLibs() @@ -128,6 +134,7 @@ static void resolveAygLibs() ptrAygInitDialog = (AygInitDialog) ayglib.resolve("SHInitDialog"); ptrAygFullScreen = (AygFullScreen) ayglib.resolve("SHFullScreen"); ptrAygSHSipInfo = (AygSHSipInfo) ayglib.resolve("SHSipInfo"); + ptrAygSHDoneButton = (AygSHDoneButton) ayglib.resolve("SHDoneButton"); } } @@ -327,6 +334,16 @@ void qt_wince_maximize(QWidget *widget) } } +void qt_wince_unmaximize(QWidget *widget) +{ + if (ptrAygSHDoneButton && qt_wince_is_mobile() + && !(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint))) + { + // Hide the [X] button, we've added in qt_wince_maximize. + ptrAygSHDoneButton(widget->winId(), SHDB_HIDE); + } +} + void qt_wince_minimize(HWND hwnd) { #ifdef Q_OS_WINCE_WM |