mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-18 21:43:18 +00:00
win32u: Use user message packing for LB_GETSELITEMS.
This commit is contained in:
parent
6b592e8102
commit
c66984d174
|
@ -875,9 +875,7 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
|||
case LB_SELECTSTRING:
|
||||
case CB_GETLBTEXT:
|
||||
case LB_GETTEXT:
|
||||
break;
|
||||
case LB_GETSELITEMS:
|
||||
if (!get_buffer_space( buffer, *wparam * sizeof(UINT), size )) return FALSE;
|
||||
break;
|
||||
case WM_NEXTMENU:
|
||||
{
|
||||
|
@ -1063,6 +1061,7 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
|
|||
case LB_SELECTSTRING:
|
||||
case CB_GETLBTEXT:
|
||||
case LB_GETTEXT:
|
||||
case LB_GETSELITEMS:
|
||||
{
|
||||
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
||||
*result_ptr = result;
|
||||
|
|
|
@ -631,6 +631,9 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
|||
if (!get_buffer_space( buffer, size, prev_size )) return FALSE;
|
||||
break;
|
||||
}
|
||||
case LB_GETSELITEMS:
|
||||
if (!get_buffer_space( buffer, *wparam * sizeof(UINT), size )) return FALSE;
|
||||
break;
|
||||
case WM_WINE_SETWINDOWPOS:
|
||||
{
|
||||
WINDOWPOS wp;
|
||||
|
@ -1470,6 +1473,9 @@ size_t user_message_size( HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam,
|
|||
size = send_message_timeout( hwnd, LB_GETTEXTLEN, wparam, 0, SMTO_NORMAL, 0, ansi );
|
||||
size = (size + 1) * char_size( ansi );
|
||||
break;
|
||||
case LB_GETSELITEMS:
|
||||
size = wparam * sizeof(UINT);
|
||||
break;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@ -1640,6 +1646,9 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me
|
|||
case EM_GETLINE:
|
||||
copy_size = string_size( buffer, ansi );
|
||||
break;
|
||||
case LB_GETSELITEMS:
|
||||
copy_size = wparam * sizeof(UINT);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -1667,9 +1676,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
|
|||
case WM_MOVING:
|
||||
copy_size = sizeof(RECT);
|
||||
break;
|
||||
case LB_GETSELITEMS:
|
||||
copy_size = wparam * sizeof(UINT);
|
||||
break;
|
||||
case WM_MDIGETACTIVE:
|
||||
if (lparam) copy_size = sizeof(BOOL);
|
||||
break;
|
||||
|
|
|
@ -1681,6 +1681,7 @@ static void test_wndproc_hook(void)
|
|||
static const SCROLLBARINFO sbi_out = { .xyThumbTop = 60 };
|
||||
static const DWORD dw_in = 1, dw_out = 2;
|
||||
static const UINT32 tabstops_in[2] = { 3, 4 };
|
||||
static const UINT32 items_out[2] = { 1, 2 };
|
||||
|
||||
static const struct lparam_hook_test lparam_hook_tests[] =
|
||||
{
|
||||
|
@ -1891,6 +1892,11 @@ static void test_wndproc_hook(void)
|
|||
.lparam_size = sizeof(tabstops_in), .lparam = &tabstops_in, .poison_lparam = TRUE,
|
||||
.check_size = sizeof(tabstops_in),
|
||||
},
|
||||
{
|
||||
"LB_GETSELITEMS", LB_GETSELITEMS,
|
||||
.wparam = ARRAYSIZE(items_out), .msg_result = ARRAYSIZE(items_out),
|
||||
.lparam_size = sizeof(items_out), .change_lparam = items_out,
|
||||
},
|
||||
/* messages that don't change lparam */
|
||||
{ "WM_USER", WM_USER },
|
||||
{ "WM_NOTIFY", WM_NOTIFY },
|
||||
|
|
|
@ -846,6 +846,7 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par
|
|||
case EM_GETLINE:
|
||||
case CB_GETLBTEXT:
|
||||
case LB_GETTEXT:
|
||||
case LB_GETSELITEMS:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue