[PATCH 2/2] winex11.drv: Separate the (future) user32 code from the
driver code.
Pierre d'Herbemont
pdherbemont at free.fr
Thu Apr 5 06:46:15 CDT 2007
---
dlls/winex11.drv/winpos.c | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 0fb6893..19e7414 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -253,6 +253,7 @@ BOOL X11DRV_GetVisibleRect( HWND hwnd, RECT *rect)
return TRUE;
}
+
/***********************************************************************
* SetWindowPos (X11DRV.@)
*/
@@ -260,18 +261,14 @@ 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;
+ RECT new_whole_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_GetVisibleRect( hwnd, &new_whole_rect );
- old_client_rect = data->client_rect;
-
if (!(win = WIN_GetPtr( hwnd ))) return FALSE;
if (win == WND_OTHER_PROCESS)
{
@@ -302,22 +299,32 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
}
SERVER_END_REQ;
- if (win == WND_DESKTOP || data->whole_window == DefaultRootWindow(gdi_display))
+ if (ret)
{
- data->whole_rect = data->client_rect = data->window_rect = *rectWindow;
+ Display *display = thread_display();
+ RECT old_client_rect;
+
+ old_style = win->dwStyle;
+
if (win != WND_DESKTOP)
{
win->rectWindow = *rectWindow;
win->rectClient = *rectClient;
win->dwStyle = new_style;
+ }
+
+ if (!(data = X11DRV_get_win_data( hwnd )))
+ {
WIN_ReleasePtr( win );
+ return FALSE;
}
- return ret;
- }
- if (ret)
- {
- Display *display = thread_display();
+ if (hwnd == GetDesktopWindow() || data->whole_window == DefaultRootWindow(gdi_display))
+ {
+ data->whole_rect = data->client_rect = data->window_rect = *rectWindow;
+ WIN_ReleasePtr( win );
+ return TRUE;
+ }
/* invalidate DCEs */
@@ -325,14 +332,11 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
(swp_flags & (SWP_HIDEWINDOW | SWP_SHOWWINDOW)))
{
RECT rect;
- UnionRect( &rect, rectWindow, &win->rectWindow );
+ UnionRect( &rect, rectWindow, &data->window_rect );
invalidate_dce( hwnd, &rect );
}
- win->rectWindow = *rectWindow;
- win->rectClient = *rectClient;
- old_style = win->dwStyle;
- win->dwStyle = new_style;
+ old_client_rect = data->client_rect;
data->window_rect = *rectWindow;
TRACE( "win %p window %s client %s style %08x\n",
More information about the wine-patches
mailing list