winex11.drv: Use a separate function to check the valid rects in
SetWindowPos [fixed]
Pierre d'Herbemont
pdherbemont at free.fr
Thu Jan 25 17:26:35 CST 2007
Previous patch got sent while it shouldn't.
Pierre.
---
dlls/winex11.drv/winpos.c | 46
+++++++++++++++++++++++++++++++-------------
1 files changed, 32 insertions(+), 14 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 95afc40..dc837cc 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -238,25 +238,16 @@ static BOOL fullscreen_state_changed( co
return *new_fs_state != old_fs_state;
}
-
/***********************************************************************
- * SetWindowPos (X11DRV.@)
+ * X11DRV_GetVisibleRect
*/
-BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
- const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
+BOOL X11DRV_GetVisibleRect( HWND hwnd, RECT *rect, const RECT *valid_rects )
{
struct x11drv_win_data *data;
- RECT new_whole_rect, old_client_rect, old_screen_rect;
- WND *win;
- DWORD old_style, new_style;
- BOOL ret;
if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE;
- new_whole_rect = *rectWindow;
- X11DRV_window_to_X_rect( data, &new_whole_rect );
-
- old_client_rect = data->client_rect;
+ X11DRV_window_to_X_rect( data, rect );
if (!IsRectEmpty( &valid_rects[0] ))
{
@@ -265,8 +256,8 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWN
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;
+ x_offset = data->whole_rect.left - rect->left;
+ y_offset = data->whole_rect.top - rect->top;
}
if (x_offset != valid_rects[1].left - valid_rects[0].left ||
@@ -277,6 +268,33 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWN
}
}
+ return TRUE;
+}
+
+/***********************************************************************
+ * SetWindowPos (X11DRV.@)
+ */
+BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
+ const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
+{
+ struct x11drv_win_data *data;
+ RECT new_whole_rect, old_client_rect, old_screen_rect;
+ WND *win;
+ DWORD old_style, new_style;
+ BOOL ret;
+
+ if (!(data = X11DRV_get_win_data( hwnd ))) return FALSE;
+
+ new_whole_rect = *rectWindow;
+
+ old_client_rect = data->client_rect;
+
+ if (!X11DRV_GetVisibleRect( hwnd, &new_whole_rect, valid_rects))
+ {
+ /* FIXME: should copy the window bits here */
+ valid_rects = NULL;
+ }
+
if (!(win = WIN_GetPtr( hwnd ))) return FALSE;
if (win == WND_OTHER_PROCESS)
{
More information about the wine-patches
mailing list