mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 23:23:38 +00:00
win32u: Use user message packing for WM_HELP.
This commit is contained in:
parent
69834a3095
commit
e7aa894555
|
@ -853,23 +853,11 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
||||||
case WM_COMPAREITEM:
|
case WM_COMPAREITEM:
|
||||||
case WM_WINDOWPOSCHANGING:
|
case WM_WINDOWPOSCHANGING:
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
|
case WM_HELP:
|
||||||
break;
|
break;
|
||||||
case WM_NOTIFY:
|
case WM_NOTIFY:
|
||||||
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
case WM_HELP:
|
|
||||||
{
|
|
||||||
HELPINFO hi;
|
|
||||||
if (size < sizeof(ps->hi)) return FALSE;
|
|
||||||
hi.cbSize = sizeof(hi);
|
|
||||||
hi.iContextType = ps->hi.iContextType;
|
|
||||||
hi.iCtrlId = ps->hi.iCtrlId;
|
|
||||||
hi.hItemHandle = unpack_handle( ps->hi.hItemHandle );
|
|
||||||
hi.dwContextId = (ULONG_PTR)unpack_ptr( ps->hi.dwContextId );
|
|
||||||
hi.MousePos = ps->hi.MousePos;
|
|
||||||
memcpy( &ps->hi, &hi, sizeof(hi) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case WM_STYLECHANGING:
|
case WM_STYLECHANGING:
|
||||||
case WM_STYLECHANGED:
|
case WM_STYLECHANGED:
|
||||||
minsize = sizeof(STYLESTRUCT);
|
minsize = sizeof(STYLESTRUCT);
|
||||||
|
@ -1114,6 +1102,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
|
||||||
case WM_WINDOWPOSCHANGING:
|
case WM_WINDOWPOSCHANGING:
|
||||||
case WM_WINDOWPOSCHANGED:
|
case WM_WINDOWPOSCHANGED:
|
||||||
case WM_COPYDATA:
|
case WM_COPYDATA:
|
||||||
|
case WM_HELP:
|
||||||
{
|
{
|
||||||
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
||||||
*result_ptr = result;
|
*result_ptr = result;
|
||||||
|
|
|
@ -523,6 +523,19 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
||||||
memcpy( &ps->cds, &cds, sizeof(cds) );
|
memcpy( &ps->cds, &cds, sizeof(cds) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case WM_HELP:
|
||||||
|
{
|
||||||
|
HELPINFO hi;
|
||||||
|
if (size < sizeof(ps->hi)) return FALSE;
|
||||||
|
hi.cbSize = sizeof(hi);
|
||||||
|
hi.iContextType = ps->hi.iContextType;
|
||||||
|
hi.iCtrlId = ps->hi.iCtrlId;
|
||||||
|
hi.hItemHandle = wine_server_ptr_handle( ps->hi.hItemHandle );
|
||||||
|
hi.dwContextId = (ULONG_PTR)unpack_ptr( ps->hi.dwContextId );
|
||||||
|
hi.MousePos = ps->hi.MousePos;
|
||||||
|
memcpy( &ps->hi, &hi, sizeof(hi) );
|
||||||
|
break;
|
||||||
|
}
|
||||||
case WM_WINE_SETWINDOWPOS:
|
case WM_WINE_SETWINDOWPOS:
|
||||||
{
|
{
|
||||||
WINDOWPOS wp;
|
WINDOWPOS wp;
|
||||||
|
@ -1332,6 +1345,9 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
|
||||||
size = sizeof(*cds) + cds->cbData;
|
size = sizeof(*cds) + cds->cbData;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case WM_HELP:
|
||||||
|
size = sizeof(HELPINFO);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
|
|
|
@ -218,6 +218,16 @@ typedef struct
|
||||||
ULONG lpData;
|
ULONG lpData;
|
||||||
} COPYDATASTRUCT32;
|
} COPYDATASTRUCT32;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
UINT cbSize;
|
||||||
|
INT iContextType;
|
||||||
|
INT iCtrlId;
|
||||||
|
ULONG hItemHandle;
|
||||||
|
DWORD dwContextId;
|
||||||
|
POINT MousePos;
|
||||||
|
} HELPINFO32;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
UINT CtlType;
|
UINT CtlType;
|
||||||
|
@ -734,6 +744,20 @@ static size_t packed_message_64to32( UINT message, WPARAM wparam,
|
||||||
if (size) memmove( (char *)params32 + sizeof(cds32), cds64 + 1, size );
|
if (size) memmove( (char *)params32 + sizeof(cds32), cds64 + 1, size );
|
||||||
return sizeof(cds32) + size;
|
return sizeof(cds32) + size;
|
||||||
}
|
}
|
||||||
|
case WM_HELP:
|
||||||
|
{
|
||||||
|
HELPINFO32 hi32;
|
||||||
|
const HELPINFO *hi64 = params64;
|
||||||
|
|
||||||
|
hi32.cbSize = sizeof(hi32);
|
||||||
|
hi32.iContextType = hi64->iContextType;
|
||||||
|
hi32.iCtrlId = hi64->iCtrlId;
|
||||||
|
hi32.hItemHandle = HandleToLong( hi64->hItemHandle );
|
||||||
|
hi32.dwContextId = hi64->dwContextId;
|
||||||
|
hi32.MousePos = hi64->MousePos;
|
||||||
|
memcpy( params32, &hi32, sizeof(hi32) );
|
||||||
|
return sizeof(hi32);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
memmove( params32, params64, size );
|
memmove( params32, params64, size );
|
||||||
|
@ -3280,6 +3304,20 @@ static LRESULT message_call_32to64( HWND hwnd, UINT msg, WPARAM wparam, LPARAM l
|
||||||
return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&cds, result_info, type, ansi );
|
return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&cds, result_info, type, ansi );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case WM_HELP:
|
||||||
|
{
|
||||||
|
HELPINFO32 *hi32 = (void *)lparam;
|
||||||
|
HELPINFO hi64;
|
||||||
|
|
||||||
|
hi64.cbSize = sizeof(hi64);
|
||||||
|
hi64.iContextType = hi32->iContextType;
|
||||||
|
hi64.iCtrlId = hi32->iCtrlId;
|
||||||
|
hi64.hItemHandle = LongToHandle( hi32->hItemHandle );
|
||||||
|
hi64.dwContextId = hi32->dwContextId;
|
||||||
|
hi64.MousePos = hi32->MousePos;
|
||||||
|
return NtUserMessageCall( hwnd, msg, wparam, (LPARAM)&hi64, result_info, type, ansi );
|
||||||
|
}
|
||||||
|
|
||||||
case WM_GETDLGCODE:
|
case WM_GETDLGCODE:
|
||||||
if (lparam)
|
if (lparam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue