win32u: Move NtUserMoveWindow implementation from user32.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b308b9cb31
commit
a34032b0f0
|
@ -1229,8 +1229,8 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
SetRect(&rect, 0, 0, LOWORD(lParam), HIWORD(lParam));
|
||||
AdjustWindowRectEx(&rect, GetWindowLongA(ci->hwndActiveChild, GWL_STYLE),
|
||||
0, GetWindowLongA(ci->hwndActiveChild, GWL_EXSTYLE) );
|
||||
MoveWindow(ci->hwndActiveChild, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top, 1);
|
||||
NtUserMoveWindow( ci->hwndActiveChild, rect.left, rect.top,
|
||||
rect.right - rect.left, rect.bottom - rect.top, 1 );
|
||||
}
|
||||
else
|
||||
MDI_PostUpdate(hwnd, ci, SB_BOTH+1);
|
||||
|
@ -1348,7 +1348,7 @@ LRESULT WINAPI DefFrameProcW( HWND hwnd, HWND hwndMDIClient,
|
|||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
MoveWindow(hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
|
||||
NtUserMoveWindow( hwndMDIClient, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE );
|
||||
break;
|
||||
|
||||
case WM_NEXTMENU:
|
||||
|
|
|
@ -1173,35 +1173,35 @@ static void SCROLL_CreateScrollBar(HWND hwnd, LPCREATESTRUCTW lpCreate)
|
|||
if (lpCreate->style & (SBS_SIZEGRIP | SBS_SIZEBOX))
|
||||
{
|
||||
if (lpCreate->style & SBS_SIZEBOXTOPLEFTALIGN)
|
||||
MoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1,
|
||||
GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y, GetSystemMetrics(SM_CXVSCROLL)+1,
|
||||
GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
else if(lpCreate->style & SBS_SIZEBOXBOTTOMRIGHTALIGN)
|
||||
MoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
|
||||
lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1,
|
||||
GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
NtUserMoveWindow( hwnd, lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
|
||||
lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1,
|
||||
GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
}
|
||||
else if (lpCreate->style & SBS_VERT)
|
||||
{
|
||||
if (lpCreate->style & SBS_LEFTALIGN)
|
||||
MoveWindow( hwnd, lpCreate->x, lpCreate->y,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE );
|
||||
NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE );
|
||||
else if (lpCreate->style & SBS_RIGHTALIGN)
|
||||
MoveWindow( hwnd,
|
||||
lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
|
||||
lpCreate->y,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE );
|
||||
NtUserMoveWindow( hwnd,
|
||||
lpCreate->x+lpCreate->cx-GetSystemMetrics(SM_CXVSCROLL)-1,
|
||||
lpCreate->y,
|
||||
GetSystemMetrics(SM_CXVSCROLL)+1, lpCreate->cy, FALSE );
|
||||
}
|
||||
else /* SBS_HORZ */
|
||||
{
|
||||
if (lpCreate->style & SBS_TOPALIGN)
|
||||
MoveWindow( hwnd, lpCreate->x, lpCreate->y,
|
||||
lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
NtUserMoveWindow( hwnd, lpCreate->x, lpCreate->y,
|
||||
lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
else if (lpCreate->style & SBS_BOTTOMALIGN)
|
||||
MoveWindow( hwnd,
|
||||
lpCreate->x,
|
||||
lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
|
||||
lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
NtUserMoveWindow( hwnd,
|
||||
lpCreate->x,
|
||||
lpCreate->y+lpCreate->cy-GetSystemMetrics(SM_CYHSCROLL)-1,
|
||||
lpCreate->cx, GetSystemMetrics(SM_CYHSCROLL)+1, FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -542,7 +542,7 @@
|
|||
@ stdcall MonitorFromPoint(int64 long)
|
||||
@ stdcall MonitorFromRect(ptr long)
|
||||
@ stdcall MonitorFromWindow(long long)
|
||||
@ stdcall MoveWindow(long long long long long long)
|
||||
@ stdcall MoveWindow(long long long long long long) NtUserMoveWindow
|
||||
@ stdcall MsgWaitForMultipleObjects(long ptr long long long)
|
||||
@ stdcall MsgWaitForMultipleObjectsEx(long ptr long long long)
|
||||
@ stdcall NotifyWinEvent(long long long long) NtUserNotifyWinEvent
|
||||
|
|
|
@ -561,19 +561,6 @@ BOOL WINAPI BringWindowToTop( HWND hwnd )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* MoveWindow (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI MoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy,
|
||||
BOOL repaint )
|
||||
{
|
||||
int flags = SWP_NOZORDER | SWP_NOACTIVATE;
|
||||
if (!repaint) flags |= SWP_NOREDRAW;
|
||||
TRACE("%p %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint );
|
||||
return SetWindowPos( hwnd, 0, x, y, cx, cy, flags );
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* get_work_rect
|
||||
*
|
||||
|
|
|
@ -1177,6 +1177,7 @@ static struct unix_funcs unix_funcs =
|
|||
NtUserGetUpdatedClipboardFormats,
|
||||
NtUserIsClipboardFormatAvailable,
|
||||
NtUserMapVirtualKeyEx,
|
||||
NtUserMoveWindow,
|
||||
NtUserRegisterClassExWOW,
|
||||
NtUserRegisterHotKey,
|
||||
NtUserScrollDC,
|
||||
|
|
|
@ -1084,7 +1084,7 @@
|
|||
@ stub NtUserMinMaximize
|
||||
@ stub NtUserModifyUserStartupInfoFlags
|
||||
@ stub NtUserModifyWindowTouchCapability
|
||||
@ stub NtUserMoveWindow
|
||||
@ stdcall NtUserMoveWindow(long long long long long long)
|
||||
@ stub NtUserMsgWaitForMultipleObjectsEx
|
||||
@ stub NtUserNavigateFocus
|
||||
@ stub NtUserNotifyIMEStatus
|
||||
|
|
|
@ -218,6 +218,7 @@ struct unix_funcs
|
|||
BOOL (WINAPI *pNtUserGetUpdatedClipboardFormats)( UINT *formats, UINT size, UINT *out_size );
|
||||
BOOL (WINAPI *pNtUserIsClipboardFormatAvailable)( UINT format );
|
||||
UINT (WINAPI *pNtUserMapVirtualKeyEx)( UINT code, UINT type, HKL layout );
|
||||
BOOL (WINAPI *pNtUserMoveWindow)( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
|
||||
ATOM (WINAPI *pNtUserRegisterClassExWOW)( const WNDCLASSEXW *wc, UNICODE_STRING *name,
|
||||
UNICODE_STRING *version,
|
||||
struct client_menu_name *client_menu_name,
|
||||
|
|
|
@ -1276,6 +1276,17 @@ BOOL WINAPI NtUserSetWindowPos( HWND hwnd, HWND after, INT x, INT y, INT cx, INT
|
|||
return user_callbacks && user_callbacks->pSetWindowPos( hwnd, after, x, y, cx, cy, flags );
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserMoveWindow (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint )
|
||||
{
|
||||
int flags = SWP_NOZORDER | SWP_NOACTIVATE;
|
||||
if (!repaint) flags |= SWP_NOREDRAW;
|
||||
TRACE( "%p %d,%d %dx%d %d\n", hwnd, x, y, cx, cy, repaint );
|
||||
return NtUserSetWindowPos( hwnd, 0, x, y, cx, cy, flags );
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
* NtUserGetLayeredWindowAttributes (win32u.@)
|
||||
*/
|
||||
|
|
|
@ -840,6 +840,12 @@ INT WINAPI NtUserGetKeyNameText( LONG lparam, WCHAR *buffer, INT size )
|
|||
return unix_funcs->pNtUserGetKeyNameText( lparam, buffer, size );
|
||||
}
|
||||
|
||||
BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint )
|
||||
{
|
||||
if (!unix_funcs) return 0;
|
||||
return unix_funcs->pNtUserMoveWindow( hwnd, x, y, cx, cy, repaint );
|
||||
}
|
||||
|
||||
INT WINAPI NtUserGetPriorityClipboardFormat( UINT *list, INT count )
|
||||
{
|
||||
if (!unix_funcs) return 0;
|
||||
|
|
|
@ -340,6 +340,9 @@ NTSTATUS WINAPI NtUserInitializeClientPfnArrays( const struct user_client_procs
|
|||
INT WINAPI NtUserInternalGetWindowText( HWND hwnd, WCHAR *text, INT count );
|
||||
BOOL WINAPI NtUserIsClipboardFormatAvailable( UINT format );
|
||||
UINT WINAPI NtUserMapVirtualKeyEx( UINT code, UINT type, HKL layout );
|
||||
BOOL WINAPI NtUserMessageCall( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam,
|
||||
ULONG_PTR result_info, DWORD type, BOOL ansi );
|
||||
BOOL WINAPI NtUserMoveWindow( HWND hwnd, INT x, INT y, INT cx, INT cy, BOOL repaint );
|
||||
void WINAPI NtUserNotifyWinEvent( DWORD event, HWND hwnd, LONG object_id, LONG child_id );
|
||||
HWINSTA WINAPI NtUserOpenWindowStation( OBJECT_ATTRIBUTES *attr, ACCESS_MASK access );
|
||||
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
|
||||
|
|
Loading…
Reference in New Issue