From 0e28140ff8d59f28791663e63c59075e102de105 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Fri, 23 Feb 2007 20:26:28 +0100 Subject: [PATCH] winex11.drv: Check the valid rects after the set_window_pos wineserver call. --- dlls/winex11.drv/winpos.c | 43 +++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c index 56c2b7c17cf..e41b11fb149 100644 --- a/dlls/winex11.drv/winpos.c +++ b/dlls/winex11.drv/winpos.c @@ -258,25 +258,6 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, old_client_rect = data->client_rect; - if (!IsRectEmpty( &valid_rects[0] )) - { - int x_offset = 0, y_offset = 0; - - if (data->whole_window) - { - /* the X server will move the bits for us */ - x_offset = data->whole_rect.left - new_whole_rect.left; - y_offset = data->whole_rect.top - new_whole_rect.top; - } - - if (x_offset != valid_rects[1].left - valid_rects[0].left || - y_offset != valid_rects[1].top - valid_rects[0].top) - { - /* FIXME: should copy the window bits here */ - valid_rects = NULL; - } - } - if (!(win = WIN_GetPtr( hwnd ))) return FALSE; if (win == WND_OTHER_PROCESS) { @@ -343,7 +324,29 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow, TRACE( "win %p window %s client %s style %08x\n", hwnd, wine_dbgstr_rect(rectWindow), wine_dbgstr_rect(rectClient), new_style ); - /* FIXME: copy the valid bits */ + if (!IsRectEmpty( &valid_rects[0] )) + { + int x_offset = 0, y_offset = 0; + + if (data->whole_window) + { + /* the X server will move the bits for us */ + x_offset = data->whole_rect.left - new_whole_rect.left; + y_offset = data->whole_rect.top - new_whole_rect.top; + } + + if (x_offset != valid_rects[1].left - valid_rects[0].left || + y_offset != valid_rects[1].top - valid_rects[0].top) + { + /* FIXME: should copy the window bits here */ + RECT invalid_rect = valid_rects[0]; + + /* invalid_rects are relative to the client area */ + OffsetRect( &invalid_rect, -rectClient->left, -rectClient->top ); + RedrawWindow( hwnd, &invalid_rect, NULL, RDW_INVALIDATE | RDW_ERASE | RDW_ALLCHILDREN ); + } + } + if (data->whole_window && !data->lock_changes) {