winex11.drv: Use EqualRect() instead of memcmp() to compare RECTs.
Signed-off-by: Hadrien Boizard <h.boizard@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c1a8fbbb77
commit
288a15fabd
|
@ -2243,7 +2243,7 @@ void CDECL X11DRV_WindowPosChanging( HWND hwnd, HWND insert_after, UINT swp_flag
|
|||
surface_rect = get_surface_rect( visible_rect );
|
||||
if (data->surface)
|
||||
{
|
||||
if (!memcmp( &data->surface->rect, &surface_rect, sizeof(surface_rect) ))
|
||||
if (EqualRect( &data->surface->rect, &surface_rect ))
|
||||
{
|
||||
/* existing surface is good enough */
|
||||
window_surface_add_ref( data->surface );
|
||||
|
@ -2311,7 +2311,7 @@ void CDECL X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, UINT swp_flags
|
|||
old_client_rect.right - data->client_rect.right == x_offset &&
|
||||
old_client_rect.top - data->client_rect.top == y_offset &&
|
||||
old_client_rect.bottom - data->client_rect.bottom == y_offset &&
|
||||
!memcmp( &valid_rects[0], &data->client_rect, sizeof(RECT) ))
|
||||
EqualRect( &valid_rects[0], &data->client_rect ))
|
||||
{
|
||||
/* if we have an X window the bits will be moved by the X server */
|
||||
if (!window && (x_offset != 0 || y_offset != 0))
|
||||
|
@ -2595,7 +2595,7 @@ BOOL CDECL X11DRV_UpdateLayeredWindow( HWND hwnd, const UPDATELAYEREDWINDOWINFO
|
|||
OffsetRect( &rect, -window_rect->left, -window_rect->top );
|
||||
|
||||
surface = data->surface;
|
||||
if (!surface || memcmp( &surface->rect, &rect, sizeof(RECT) ))
|
||||
if (!surface || !EqualRect( &surface->rect, &rect ))
|
||||
{
|
||||
data->surface = create_surface( data->whole_window, &data->vis, &rect,
|
||||
color_key, !data->embedded );
|
||||
|
|
Loading…
Reference in New Issue