mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 11:13:37 +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_SETSCROLLINFO:
|
||||||
case SBM_GETSCROLLINFO:
|
case SBM_GETSCROLLINFO:
|
||||||
case SBM_GETSCROLLBARINFO:
|
case SBM_GETSCROLLBARINFO:
|
||||||
break;
|
|
||||||
case WM_NOTIFY:
|
|
||||||
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
|
||||||
return FALSE;
|
|
||||||
case EM_GETRECT:
|
case EM_GETRECT:
|
||||||
case LB_GETITEMRECT:
|
case LB_GETITEMRECT:
|
||||||
case CB_GETDROPPEDCONTROLRECT:
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
if (!get_buffer_space( buffer, sizeof(RECT), size )) return FALSE;
|
|
||||||
break;
|
|
||||||
case EM_SETRECT:
|
case EM_SETRECT:
|
||||||
case EM_SETRECTNP:
|
case EM_SETRECTNP:
|
||||||
minsize = sizeof(RECT);
|
|
||||||
break;
|
break;
|
||||||
case EM_GETLINE:
|
case EM_GETLINE:
|
||||||
{
|
{
|
||||||
|
@ -982,6 +975,9 @@ BOOL unpack_message( HWND hwnd, UINT message, WPARAM *wparam, LPARAM *lparam,
|
||||||
if (!(*wparam & 0x8000)) return TRUE;
|
if (!(*wparam & 0x8000)) return TRUE;
|
||||||
minsize = sizeof(DEV_BROADCAST_HDR);
|
minsize = sizeof(DEV_BROADCAST_HDR);
|
||||||
break;
|
break;
|
||||||
|
case WM_NOTIFY:
|
||||||
|
/* WM_NOTIFY cannot be sent across processes (MSDN) */
|
||||||
|
return FALSE;
|
||||||
case WM_NCPAINT:
|
case WM_NCPAINT:
|
||||||
if (*wparam <= 1) return TRUE;
|
if (*wparam <= 1) return TRUE;
|
||||||
FIXME( "WM_NCPAINT hdc unpacking not supported\n" );
|
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 EM_GETSEL:
|
||||||
case SBM_GETRANGE:
|
case SBM_GETRANGE:
|
||||||
case CB_GETEDITSEL:
|
case CB_GETEDITSEL:
|
||||||
|
case EM_GETRECT:
|
||||||
|
case LB_GETITEMRECT:
|
||||||
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
|
case EM_SETRECT:
|
||||||
|
case EM_SETRECTNP:
|
||||||
{
|
{
|
||||||
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
LRESULT *result_ptr = (LRESULT *)buffer - 1;
|
||||||
*result_ptr = result;
|
*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);
|
if (*lparam) *lparam = (LPARAM)((DWORD *)*buffer + 1);
|
||||||
}
|
}
|
||||||
return TRUE;
|
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:
|
case WM_WINE_SETWINDOWPOS:
|
||||||
{
|
{
|
||||||
WINDOWPOS wp;
|
WINDOWPOS wp;
|
||||||
|
@ -1380,6 +1389,13 @@ size_t user_message_size( UINT message, WPARAM wparam, LPARAM lparam, BOOL other
|
||||||
case CB_GETEDITSEL:
|
case CB_GETEDITSEL:
|
||||||
size = 2 * sizeof(DWORD);
|
size = 2 * sizeof(DWORD);
|
||||||
break;
|
break;
|
||||||
|
case EM_GETRECT:
|
||||||
|
case LB_GETITEMRECT:
|
||||||
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
|
case EM_SETRECT:
|
||||||
|
case EM_SETRECTNP:
|
||||||
|
size = sizeof(RECT);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return size;
|
return size;
|
||||||
|
@ -1442,6 +1458,8 @@ void pack_user_message( void *buffer, size_t size, UINT message,
|
||||||
case EM_GETSEL:
|
case EM_GETSEL:
|
||||||
case SBM_GETRANGE:
|
case SBM_GETRANGE:
|
||||||
case CB_GETEDITSEL:
|
case CB_GETEDITSEL:
|
||||||
|
case EM_GETRECT:
|
||||||
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
return;
|
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];
|
if (lparam) *(DWORD *)lparam = ptr[1];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case EM_GETRECT:
|
||||||
|
case EM_SETRECT:
|
||||||
|
case EM_SETRECTNP:
|
||||||
|
case LB_GETITEMRECT:
|
||||||
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
|
copy_size = sizeof(RECT);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1558,9 +1583,6 @@ static void copy_reply( LRESULT result, HWND hwnd, UINT message, WPARAM wparam,
|
||||||
case CB_GETCOMBOBOXINFO:
|
case CB_GETCOMBOBOXINFO:
|
||||||
copy_size = sizeof(COMBOBOXINFO);
|
copy_size = sizeof(COMBOBOXINFO);
|
||||||
break;
|
break;
|
||||||
case EM_GETRECT:
|
|
||||||
case LB_GETITEMRECT:
|
|
||||||
case CB_GETDROPPEDCONTROLRECT:
|
|
||||||
case WM_SIZING:
|
case WM_SIZING:
|
||||||
case WM_MOVING:
|
case WM_MOVING:
|
||||||
copy_size = sizeof(RECT);
|
copy_size = sizeof(RECT);
|
||||||
|
|
|
@ -1685,16 +1685,28 @@ static void test_wndproc_hook(void)
|
||||||
.check_size = sizeof(RECT),
|
.check_size = sizeof(RECT),
|
||||||
.todo = TRUE
|
.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,
|
"LB_GETITEMRECT", LB_GETITEMRECT,
|
||||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||||
.check_size = sizeof(RECT),
|
.check_size = sizeof(RECT),
|
||||||
.todo = TRUE
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"CB_GETDROPPEDCONTROLRECT", CB_GETDROPPEDCONTROLRECT,
|
"CB_GETDROPPEDCONTROLRECT", CB_GETDROPPEDCONTROLRECT,
|
||||||
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
.lparam = &rect_in, .lparam_size = sizeof(RECT), .change_lparam = &rect_out,
|
||||||
.todo = TRUE
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"WM_GETTEXT", WM_GETTEXT, .wparam = 8,
|
"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 EM_GETSEL:
|
||||||
case SBM_GETRANGE:
|
case SBM_GETRANGE:
|
||||||
case CB_GETEDITSEL:
|
case CB_GETEDITSEL:
|
||||||
|
case EM_SETRECT:
|
||||||
|
case EM_GETRECT:
|
||||||
|
case EM_SETRECTNP:
|
||||||
|
case LB_GETITEMRECT:
|
||||||
|
case CB_GETDROPPEDCONTROLRECT:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in a new issue