mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 12:33:40 +00:00
win32u: Use user message packing for messages passing RECT struct.
This commit is contained in:
parent
0dbafa8496
commit
1e409563c7
|
@ -869,18 +869,11 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
|||
case SBM_SETSCROLLINFO:
|
||||
case SBM_GETSCROLLINFO:
|
||||
case SBM_GETSCROLLBARINFO:
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
||||
return FALSE;
|
||||
case EM_GETRECT:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
if (!get_buffer_space( buffer, sizeof(RECT), size )) return FALSE;
|
||||
break;
|
||||
case EM_SETRECT:
|
||||
case EM_SETRECTNP:
|
||||
minsize = sizeof(RECT);
|
||||
break;
|
||||
case EM_GETLINE:
|
||||
{
|
||||
|
@ -982,6 +975,9 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
|||
if (!(*wparam & 0x8000)) return TRUE;
|
||||
minsize = sizeof(DEV_BROADCAST_HDR);
|
||||
break;
|
||||
case WM_NOTIFY:
|
||||
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
||||
return FALSE;
|
||||
case WM_NCPAINT:
|
||||
if (*wparam <= 1) return TRUE;
|
||||
FIXME( "WM_NCPAINT hdc unpacking not supported\n" );
|
||||
|
@ -1089,6 +1085,11 @@ BOOL WINAPI User32CallWindowProc( struct win_proc_params *params, ULONG size )
|
|||
case EM_GETSEL:
|
||||
case SBM_GETRANGE:
|
||||
case CB_GETEDITSEL:
|
||||
case EM_GETRECT:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
case EM_SETRECT:
|
||||
case EM_SETRECTNP:
|
||||
{
|
||||
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
||||
*result_ptr = result;
|
||||
|
|
|
@ -574,6 +574,15 @@ static BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lpa
|
|||
if (*lparam) *lparam = (LPARAM)((DWORD *)*buffer + 1);
|
||||
}
|
||||
return TRUE;
|
||||
case EM_GETRECT:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
if (!get_buffer_space( buffer, sizeof(RECT), size )) return FALSE;
|
||||
break;
|
||||
case EM_SETRECT:
|
||||
case EM_SETRECTNP:
|
||||
minsize = sizeof(RECT);
|
||||
break;
|
||||
case WM_WINE_SETWINDOWPOS:
|
||||
{
|
||||
WINDOWPOS wp;
|
||||
|
@ -1380,6 +1389,13 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
|
|||
case CB_GETEDITSEL:
|
||||
size = 2 * sizeof(DWORD);
|
||||
break;
|
||||
case EM_GETRECT:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
case EM_SETRECT:
|
||||
case EM_SETRECTNP:
|
||||
size = sizeof(RECT);
|
||||
break;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@ -1442,6 +1458,8 @@ void pack_user_message( void *buffer, size_t size, UINT message,
|
|||
case EM_GETSEL:
|
||||
case SBM_GETRANGE:
|
||||
case CB_GETEDITSEL:
|
||||
case EM_GETRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1531,6 +1549,13 @@ static void copy_user_result( void *buffer, size_t size, LRESULT result, UINT me
|
|||
if (lparam) *(DWORD *)lparam = ptr[1];
|
||||
break;
|
||||
}
|
||||
case EM_GETRECT:
|
||||
case EM_SETRECT:
|
||||
case EM_SETRECTNP:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
copy_size = sizeof(RECT);
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
@ -1558,9 +1583,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
|
|||
case CB_GETCOMBOBOXINFO:
|
||||
copy_size = sizeof(COMBOBOXINFO);
|
||||
break;
|
||||
case EM_GETRECT:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
case WM_SIZING:
|
||||
case WM_MOVING:
|
||||
copy_size = sizeof(RECT);
|
||||
|
|
|
@ -1685,16 +1685,28 @@ static void test_wndproc_hook(void)
|
|||
.check_size = sizeof(RECT),
|
||||
.todo = TRUE
|
||||
},
|
||||
{
|
||||
"EM_GETRECT", EM_GETRECT,
|
||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||
},
|
||||
{
|
||||
"EM_SETRECT", EM_SETRECT,
|
||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||
.check_size = sizeof(RECT),
|
||||
},
|
||||
{
|
||||
"EM_SETRECTNP", EM_SETRECTNP,
|
||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||
.check_size = sizeof(RECT),
|
||||
},
|
||||
{
|
||||
"LB_GETITEMRECT", LB_GETITEMRECT,
|
||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||
.check_size = sizeof(RECT),
|
||||
.todo = TRUE
|
||||
},
|
||||
{
|
||||
"CB_GETDROPPEDCONTROLRECT", CB_GETDROPPEDCONTROLRECT,
|
||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||
.todo = TRUE
|
||||
},
|
||||
{
|
||||
"WM_GETTEXT", WM_GETTEXT, .wparam = 8,
|
||||
|
|
|
@ -838,6 +838,11 @@ static size_t packed_result_32to64( UINT message, WPARAM wparam, const void *par
|
|||
case EM_GETSEL:
|
||||
case SBM_GETRANGE:
|
||||
case CB_GETEDITSEL:
|
||||
case EM_SETRECT:
|
||||
case EM_GETRECT:
|
||||
case EM_SETRECTNP:
|
||||
case LB_GETITEMRECT:
|
||||
case CB_GETDROPPEDCONTROLRECT:
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue