summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2011-03-28 09:58:28 +0200
committerOlivier Goffart <olivier.goffart@nokia.com>2011-05-10 12:54:44 +0200
commit75bec8093ddba779001a4a0ba4b68ab3057c1258 (patch)
tree2cef31d8d50c1d39859d9c0cf6ed76ccaf67f952 /src
parent45c8b242f334e1e3ba4910dd7813cba0972bcbd8 (diff)
Fixed regression where AT client did not always announce stuff properly.
This fixes a regression that was created by 75e478abdf336bbdc1b00e2ca4f5293d5455a0cb. That broke accessibility on 64 bit windows, since lParam can both be 0x00000000fffffffc and 0xfffffffffffffffc. However, MSDN explicitly says that lParam should be casted to a DWORD, which would result in (an unsigned) 0xfffffffc in both cases. This can then be compared to OBJID_CLIENT (defined to ((LONG)0xFFFFFFFC). Reviewed-by: Prasanth Ullattil (cherry picked from commit 504941bc50234c225f162192491815bc4d6c38cf)
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qapplication_win.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 72a05afbd0..63e2319b3e 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2372,8 +2372,13 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
#ifndef QT_NO_ACCESSIBILITY
case WM_GETOBJECT:
{
+ /* On Win64, lParam can be 0x00000000fffffffc or 0xfffffffffffffffc (!),
+ but MSDN says that lParam should be converted to a DWORD
+ before its compared against OBJID_CLIENT
+ */
+ const DWORD dwObjId = (DWORD)lParam;
// Ignoring all requests while starting up
- if (QApplication::startingUp() || QApplication::closingDown() || lParam != (LPARAM)OBJID_CLIENT) {
+ if (QApplication::startingUp() || QApplication::closingDown() || dwObjId != OBJID_CLIENT) {
result = false;
break;
}