summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguifunctions_wince.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2010-07-16 10:43:14 +0200
committerJoerg Bornemann <joerg.bornemann@nokia.com>2010-07-16 11:40:48 +0200
commitad4aff6e2d188d88a2c6b4b692932adb08491d22 (patch)
treed79908fc4f52b6417d29516bab96130ba3c1d859 /src/gui/kernel/qguifunctions_wince.cpp
parent2c1aafa47b8915ea8aae8da229d65086e42543b3 (diff)
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.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index bdaed654e6..377dfe3187 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