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)
This commit is contained in:
Jan-Arve Sæther 2011-03-28 09:58:28 +02:00 committed by Olivier Goffart
parent 45c8b242f3
commit 75bec8093d

View File

@ -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;
}