Hadrien Boizard : winex11.drv: Use EqualRect() instead of memcmp() to compare RECTs.
Alexandre Julliard
julliard at winehq.org
Wed Oct 19 20:47:57 CDT 2016
Module: wine
Branch: master
Commit: 288a15fabde623597b272597ec84afbddb4636e9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=288a15fabde623597b272597ec84afbddb4636e9
Author: Hadrien Boizard <h.boizard at gmail.com>
Date: Thu Oct 13 17:05:08 2016 +0200
winex11.drv: Use EqualRect() instead of memcmp() to compare RECTs.
Signed-off-by: Hadrien Boizard <h.boizard at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winex11.drv/window.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 0de7955..7408a0e 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -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 );
More information about the wine-cvs
mailing list