Commit e5e58a6b authored by Pierre d'Herbemont's avatar Pierre d'Herbemont Committed by Alexandre Julliard

user32: Factorize driver's SetWindowPos in user32.

parent 3d11b865
......@@ -370,7 +370,8 @@ static HWND nulldrv_SetParent( HWND hwnd, HWND parent )
return 0;
}
static BOOL nulldrv_SetWindowPos( WINDOWPOS *pos )
static BOOL nulldrv_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
{
return FALSE;
}
......@@ -688,9 +689,10 @@ static HWND loaderdrv_SetParent( HWND hwnd, HWND parent )
return load_driver()->pSetParent( hwnd, parent );
}
static BOOL loaderdrv_SetWindowPos( WINDOWPOS *pos )
static BOOL loaderdrv_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
const RECT *rectClient, UINT swp_flags, const RECT *valid_rects )
{
return load_driver()->pSetWindowPos( pos );
return load_driver()->pSetWindowPos( hwnd, insert_after, rectWindow, rectClient, swp_flags, valid_rects );
}
static int loaderdrv_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
......
......@@ -1187,7 +1187,7 @@ static LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPAR
return WIN_DestroyWindow( hwnd );
case WM_WINE_SETWINDOWPOS:
if (hwnd == GetDesktopWindow()) return 0;
return USER_Driver->pSetWindowPos( (WINDOWPOS *)lparam );
return USER_SetWindowPos( (WINDOWPOS *)lparam );
case WM_WINE_SHOWWINDOW:
if (hwnd == GetDesktopWindow()) return 0;
return ShowWindow( hwnd, wparam );
......
......@@ -149,7 +149,7 @@ typedef struct tagUSER_DRIVER {
BOOL (*pScrollDC)(HDC, INT, INT, const RECT *, const RECT *, HRGN, LPRECT);
void (*pSetFocus)(HWND);
HWND (*pSetParent)(HWND,HWND);
BOOL (*pSetWindowPos)(WINDOWPOS *);
BOOL (*pSetWindowPos)(HWND,HWND,const RECT *,const RECT *,UINT,const RECT *);
int (*pSetWindowRgn)(HWND,HRGN,BOOL);
void (*pSetWindowIcon)(HWND,UINT,HICON);
void (*pSetWindowStyle)(HWND,DWORD);
......@@ -221,6 +221,8 @@ extern void SYSPARAMS_Init(void);
extern void USER_CheckNotLock(void);
extern BOOL USER_IsExitingThread( DWORD tid );
extern BOOL USER_SetWindowPos( WINDOWPOS * winpos );
/* message spy definitions */
#define SPY_DISPATCHMESSAGE16 0x0100
......
......@@ -973,7 +973,7 @@ static void get_desktop_xwin( Display *display, struct x11drv_win_data *data )
SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window );
SetPropA( data->hwnd, visual_id_prop, (HANDLE)visualid );
data->whole_window = root_window;
X11DRV_set_window_pos( data->hwnd, 0, &virtual_screen_rect, &virtual_screen_rect,
X11DRV_SetWindowPos( data->hwnd, 0, &virtual_screen_rect, &virtual_screen_rect,
SWP_NOZORDER, NULL );
if (root_window != DefaultRootWindow( display ))
{
......@@ -1039,7 +1039,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
/* initialize the dimensions before sending WM_GETMINMAXINFO */
SetRect( &rect, cs->x, cs->y, cs->x + cs->cx, cs->y + cs->cy );
X11DRV_set_window_pos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL );
X11DRV_SetWindowPos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL );
/* create an X window if it's a top level window */
if (GetAncestor( hwnd, GA_PARENT ) == GetDesktopWindow())
......@@ -1083,7 +1083,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
if (cs->cy < 0) cs->cy = 0;
SetRect( &rect, cs->x, cs->y, cs->x + cs->cx, cs->y + cs->cy );
if (!X11DRV_set_window_pos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL )) return FALSE;
if (!X11DRV_SetWindowPos( hwnd, 0, &rect, &rect, SWP_NOZORDER, NULL )) return FALSE;
}
/* send WM_NCCREATE */
......@@ -1111,7 +1111,7 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
/* yes, even if the CBT hook was called with HWND_TOP */
insert_after = ((wndPtr->dwStyle & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD) ? HWND_BOTTOM : HWND_TOP;
X11DRV_set_window_pos( hwnd, insert_after, &wndPtr->rectWindow, &rect, 0, NULL );
X11DRV_SetWindowPos( hwnd, insert_after, &wndPtr->rectWindow, &rect, 0, NULL );
TRACE( "win %p window %d,%d,%d,%d client %d,%d,%d,%d whole %d,%d,%d,%d X client %d,%d,%d,%d xwin %x\n",
hwnd, wndPtr->rectWindow.left, wndPtr->rectWindow.top,
......
......@@ -105,7 +105,7 @@
@ cdecl SetFocus(long) X11DRV_SetFocus
@ cdecl SetParent(long long) X11DRV_SetParent
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
@ cdecl SetWindowPos(ptr) X11DRV_SetWindowPos
@ cdecl SetWindowPos(ptr ptr ptr ptr long ptr) X11DRV_SetWindowPos
@ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
@ cdecl SetWindowStyle(ptr long) X11DRV_SetWindowStyle
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
......
......@@ -683,7 +683,7 @@ extern void X11DRV_sync_window_style( Display *display, struct x11drv_win_data *
extern void X11DRV_sync_window_position( Display *display, struct x11drv_win_data *data,
UINT swp_flags, const RECT *new_client_rect,
const RECT *new_whole_rect );
extern BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
extern BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
const RECT *rectClient, UINT swp_flags, const RECT *validRects );
extern void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data );
extern void xinerama_init(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment