[try 7] winex11.drv: Check the valid rects after the set_window_pos
wineserver call
Pierre d'Herbemont
pdherbemont at free.fr
Fri Feb 23 13:26:28 CST 2007
This time with only the destination rect invalidated, and all children
gets invalidated (I have checked: wineserver does that too)
Pierre.
---
dlls/winex11.drv/winpos.c | 43
++++++++++++++++++++++++-------------------
1 files changed, 24 insertions(+), 19 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 56c2b7c..9cd36eb 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)
{
@@ -340,6 +321,30 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
win->dwStyle = new_style;
data->window_rect = *rectWindow;
+ 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_rects = valid_rects[0];
+
+ /* invalid_rects are relative to the client area */
+ OffsetRect( &invalid_rects, -rectClient->left, -rectClient->top );
+
+ RedrawWindow( hwnd, &invalid_rects, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN );
+ }
+ }
+
TRACE( "win %p window %s client %s style %08x\n",
hwnd, wine_dbgstr_rect(rectWindow), wine_dbgstr_rect(rectClient), new_style );
More information about the wine-patches
mailing list