summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qapplication_win.cpp')
-rw-r--r--src/gui/kernel/qapplication_win.cpp80
1 files changed, 14 insertions, 66 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 6ecd535..44f82b6 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1752,79 +1752,18 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
case APPCOMMAND_BASS_UP:
key = Qt::Key_BassUp;
break;
- case APPCOMMAND_BROWSER_BACKWARD:
- key = Qt::Key_Back;
- break;
- case APPCOMMAND_BROWSER_FAVORITES:
- key = Qt::Key_Favorites;
- break;
- case APPCOMMAND_BROWSER_FORWARD:
- key = Qt::Key_Forward;
- break;
- case APPCOMMAND_BROWSER_HOME:
- key = Qt::Key_HomePage;
- break;
- case APPCOMMAND_BROWSER_REFRESH:
- key = Qt::Key_Refresh;
- break;
- case APPCOMMAND_BROWSER_SEARCH:
- key = Qt::Key_Search;
- break;
- case APPCOMMAND_BROWSER_STOP:
- key = Qt::Key_Stop;
- break;
- case APPCOMMAND_LAUNCH_APP1:
- key = Qt::Key_Launch0;
- break;
- case APPCOMMAND_LAUNCH_APP2:
- key = Qt::Key_Launch1;
- break;
- case APPCOMMAND_LAUNCH_MAIL:
- key = Qt::Key_LaunchMail;
- break;
- case APPCOMMAND_LAUNCH_MEDIA_SELECT:
- key = Qt::Key_LaunchMedia;
- break;
- case APPCOMMAND_MEDIA_NEXTTRACK:
- key = Qt::Key_MediaNext;
- break;
- case APPCOMMAND_MEDIA_PLAY_PAUSE:
- key = Qt::Key_MediaPlay;
- break;
- case APPCOMMAND_MEDIA_PREVIOUSTRACK:
- key = Qt::Key_MediaPrevious;
- break;
- case APPCOMMAND_MEDIA_STOP:
- key = Qt::Key_MediaStop;
- break;
case APPCOMMAND_TREBLE_DOWN:
key = Qt::Key_TrebleDown;
break;
case APPCOMMAND_TREBLE_UP:
key = Qt::Key_TrebleUp;
break;
- case APPCOMMAND_VOLUME_DOWN:
- key = Qt::Key_VolumeDown;
- break;
- case APPCOMMAND_VOLUME_MUTE:
- key = Qt::Key_VolumeMute;
- break;
- case APPCOMMAND_VOLUME_UP:
- key = Qt::Key_VolumeUp;
- break;
- // Commands new in Windows XP
case APPCOMMAND_HELP:
key = Qt::Key_Help;
break;
case APPCOMMAND_FIND:
key = Qt::Key_Search;
break;
- case APPCOMMAND_PRINT:
- key = Qt::Key_Print;
- break;
- case APPCOMMAND_MEDIA_PLAY:
- key = Qt::Key_MediaPlay;
- break;
default:
break;
}
@@ -2028,13 +1967,22 @@ 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) {
- if (widget->windowState() & Qt::WindowMaximized)
- widget->showMaximized();
- else
- widget->show();
+#ifdef Q_WS_WINCE_WM
+ // On Windows mobile we do not receive WM_SYSCOMMAND / SC_MINIMIZE messages.
+ // Thus we have to unset the minimized state explicitly. We must do this for all
+ // top-level widgets, because we get the HWND of a random widget here.
+ foreach (QWidget* tlw, QApplication::topLevelWidgets()) {
+ if (tlw->isMinimized())
+ tlw->setWindowState(tlw->windowState() & ~Qt::WindowMinimized);
}
#else
+ // On Windows CE we do not receive WM_SYSCOMMAND / SC_MINIMIZE messages.
+ // Thus we have to unset the minimized state explicitly.
+ if (widget->windowState() & Qt::WindowMinimized)
+ widget->setWindowState(widget->windowState() & ~Qt::WindowMinimized);
+#endif // Q_WS_WINCE_WM
+
+#else
if (!(widget->windowState() & Qt::WindowMinimized)) {
#endif
// Ignore the activate message send by WindowsXP to a minimized window