Commit 61e0190a authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use user message packing for WM_STYLECHANGING.

parent e7aa8945
......@@ -854,14 +854,12 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
case WM_WINDOWPOSCHANGING:
case WM_WINDOWPOSCHANGED:
case WM_HELP:
case WM_STYLECHANGING:
case WM_STYLECHANGED:
break;
case WM_NOTIFY:
/* WM_NOTIFY cannot be sent across processes (MSDN) */
return FALSE;
case WM_STYLECHANGING:
case WM_STYLECHANGED:
minsize = sizeof(STYLESTRUCT);
break;
case WM_GETDLGCODE:
if (*lparam)
{
......@@ -1103,6 +1101,8 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
case WM_WINDOWPOSCHANGED:
case WM_COPYDATA:
case WM_HELP:
case WM_STYLECHANGING:
case WM_STYLECHANGED:
{
LRESULT *result_ptr = (LRESULT *)buffer - 1;
*result_ptr = result;
......
......@@ -536,6 +536,10 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
memcpy( &ps->hi, &hi, sizeof(hi) );
break;
}
case WM_STYLECHANGING:
case WM_STYLECHANGED:
minsize = sizeof(STYLESTRUCT);
break;
case WM_WINE_SETWINDOWPOS:
{
WINDOWPOS wp;
......@@ -1348,6 +1352,10 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
case WM_HELP:
size = sizeof(HELPINFO);
break;
case WM_STYLECHANGING:
case WM_STYLECHANGED:
size = sizeof(STYLESTRUCT);
break;
}
return size;
......@@ -1476,6 +1484,9 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me
case WM_WINDOWPOSCHANGING:
copy_size = sizeof(WINDOWPOS);
break;
case WM_STYLECHANGING:
copy_size = sizeof(STYLESTRUCT);
break;
default:
return;
}
......@@ -1503,9 +1514,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
case CB_GETCOMBOBOXINFO:
copy_size = sizeof(COMBOBOXINFO);
break;
case WM_STYLECHANGING:
copy_size = sizeof(STYLESTRUCT);
break;
case WM_GETDLGCODE:
if (lparam) copy_size = sizeof(MSG);
break;
......
......@@ -1656,6 +1656,8 @@ static void test_wndproc_hook(void)
static const COPYDATASTRUCT cds3_in = { .dwData = 2, .lpData = (void *)0xdeadbeef };
static const COPYDATASTRUCT cds4_in = { .cbData = 2 };
static const COPYDATASTRUCT cds5_in = { .lpData = (void *)0xdeadbeef };
static const STYLESTRUCT style_in = { .styleOld = 1, .styleNew = 2 };
static const STYLESTRUCT style_out = { .styleOld = 10, .styleNew = 20 };
static const struct lparam_hook_test lparam_hook_tests[] =
{
......@@ -1795,6 +1797,16 @@ static void test_wndproc_hook(void)
.lparam_size = sizeof(cds5_in), .lparam = &cds5_in, .poison_lparam = TRUE,
.check_size = sizeof(cds5_in),
},
{
"WM_STYLECHANGING", WM_STYLECHANGING,
.lparam_size = sizeof(style_in), .lparam = &style_in, .change_lparam = &style_out,
.check_size = sizeof(style_in)
},
{
"WM_STYLECHANGED", WM_STYLECHANGED,
.lparam_size = sizeof(style_in), .lparam = &style_in, .poison_lparam = TRUE,
.check_size = sizeof(style_in),
},
/* messages that don't change lparam */
{ "WM_USER", WM_USER },
{ "WM_NOTIFY", WM_NOTIFY },
......
......@@ -827,6 +827,7 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par
case WM_GETTEXT:
case WM_ASKCBFORMATNAME:
case WM_GETMINMAXINFO:
case WM_STYLECHANGING:
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment