diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-03-28 07:58:28 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2011-03-29 09:12:44 (GMT) |
commit | 504941bc50234c225f162192491815bc4d6c38cf (patch) | |
tree | aa41b1c51694f2b398638d3ef9430439f3d3193d /src/gui/kernel | |
parent | 6c9d808c5726893e9aa673ca8b0cbebae67f641c (diff) | |
download | Qt-504941bc50234c225f162192491815bc4d6c38cf.zip Qt-504941bc50234c225f162192491815bc4d6c38cf.tar.gz Qt-504941bc50234c225f162192491815bc4d6c38cf.tar.bz2 |
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
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_win.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp index 5f5da59..349323e 100644 --- a/src/gui/kernel/qapplication_win.cpp +++ b/src/gui/kernel/qapplication_win.cpp @@ -2361,8 +2361,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; } |