diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-03 18:59:28 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-02-03 18:59:28 (GMT) |
commit | d5d5cd63e68ce63eb7a131df4dc8cfa274f93fc2 (patch) | |
tree | d89879b1fdbcdba0c179acd20ad785cd9b1a18e0 /src | |
parent | 00c742407859aedd34f7d2811a8408ecd15d1e14 (diff) | |
parent | dc7aa1a9f9cd89f726a54a88ff31731c56142eb8 (diff) | |
download | Qt-d5d5cd63e68ce63eb7a131df4dc8cfa274f93fc2.zip Qt-d5d5cd63e68ce63eb7a131df4dc8cfa274f93fc2.tar.gz Qt-d5d5cd63e68ce63eb7a131df4dc8cfa274f93fc2.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into master-integration
* 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1:
Qt applications not responding to WM_GETHOTKEY on windows.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index d3bc2d8..ff8f276 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -158,6 +158,7 @@ struct QTLWExtra { quint32 newCounterValueLo; #endif #elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN + uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered. HICON winIconBig; // internal big Windows icon HICON winIconSmall; // internal small Windows icon #elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index 10522ed..a57aacc 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1094,6 +1094,21 @@ void QWidgetPrivate::show_sys() return; } + if (data.window_flags & Qt::Window) { + QTLWExtra *extra = topData(); + if (!extra->hotkeyRegistered) { + // Try to set the hotkey using information from STARTUPINFO + STARTUPINFO startupInfo; + GetStartupInfo(&startupInfo); + // If STARTF_USEHOTKEY is set, hStdInput is the virtual keycode + if (startupInfo.dwFlags & 0x00000200) { + WPARAM hotKey = (WPARAM)startupInfo.hStdInput; + SendMessage(data.winid, WM_SETHOTKEY, hotKey, 0); + } + extra->hotkeyRegistered = 1; + } + } + int sm = SW_SHOWNORMAL; bool fakedMaximize = false; if (q->isWindow()) { @@ -1687,6 +1702,7 @@ void QWidgetPrivate::deleteSysExtra() void QWidgetPrivate::createTLSysExtra() { + extra->topextra->hotkeyRegistered = 0; extra->topextra->savedFlags = 0; extra->topextra->winIconBig = 0; extra->topextra->winIconSmall = 0; |