summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2009-05-07 12:54:05 (GMT)
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-05-07 13:00:30 (GMT)
commit12348ea833bf731a0a977cd201d6804c6f3af221 (patch)
tree9f1ee1acf86a8cea1a365c02640ebf2636ac5cf7 /src/gui/kernel
parentf2fc8979cbeb732fe4799ec43d6d376aba0a87c9 (diff)
downloadQt-12348ea833bf731a0a977cd201d6804c6f3af221.zip
Qt-12348ea833bf731a0a977cd201d6804c6f3af221.tar.gz
Qt-12348ea833bf731a0a977cd201d6804c6f3af221.tar.bz2
handle the back soft key on Windows mobile SmartPhones
We must tell the system that we want to intercept the back key on Windows mobile. Each toplevel widget that needs correct back key behaviour needs to have a menu bar. Why? Ask Microsoft... Task-number: 248846 Reviewed-by: thartman
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_win.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 065e7ff..f14ad6f 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -1725,6 +1725,21 @@ LRESULT CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam
// fall-through intended
case WM_KEYUP:
case WM_SYSKEYUP:
+#if Q_OS_WINCE_WM
+ case WM_HOTKEY:
+ if(HIWORD(msg.lParam) == VK_TBACK) {
+ const bool hotKeyDown = !(LOWORD(msg.lParam) & MOD_KEYUP);
+ msg.lParam = 0x69 << 16;
+ msg.wParam = VK_BACK;
+ if (hotKeyDown) {
+ msg.message = WM_KEYDOWN;
+ qt_keymapper_private()->updateKeyMap(msg);
+ } else {
+ msg.message = WM_KEYUP;
+ }
+ }
+ // fall-through intended
+#endif
case WM_IME_CHAR:
case WM_IME_KEYDOWN:
case WM_CHAR: {