Commit 3011f24f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move NtUserShowWindow implementation from user32.

parent a831aa18
......@@ -1030,7 +1030,7 @@ static void CBRollUp( LPHEADCOMBO lphc, BOOL ok, BOOL bButton )
RECT rect;
lphc->wState &= ~CBF_DROPPED;
ShowWindow( lphc->hWndLBox, SW_HIDE );
NtUserShowWindow( lphc->hWndLBox, SW_HIDE );
if(GetCapture() == lphc->hWndLBox)
{
......@@ -1419,7 +1419,7 @@ static void CBResetPos(HEADCOMBO *combo, BOOL redraw)
if (combo->wState & CBF_DROPPED)
{
combo->wState &= ~CBF_DROPPED;
ShowWindow(combo->hWndLBox, SW_HIDE);
NtUserShowWindow( combo->hWndLBox, SW_HIDE );
}
if (redraw && !(combo->wState & CBF_NOREDRAW))
......
......@@ -562,7 +562,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
}
else pWnd->flags |= WIN_NEEDS_SHOW_OWNEDPOPUP;
WIN_ReleasePtr( pWnd );
ShowWindow( hwnd, wParam ? SW_SHOWNOACTIVATE : SW_HIDE );
NtUserShowWindow( hwnd, wParam ? SW_SHOWNOACTIVATE : SW_HIDE );
break;
}
......
......@@ -702,7 +702,7 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
if (template.style & WS_VISIBLE && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
{
ShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
NtUserShowWindow( hwnd, SW_SHOWNORMAL ); /* SW_SHOW doesn't always work */
}
return hwnd;
}
......@@ -793,7 +793,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
if (bFirstEmpty)
{
/* ShowWindow the first time the queue goes empty */
ShowWindow( hwnd, SW_SHOWNORMAL );
NtUserShowWindow( hwnd, SW_SHOWNORMAL );
bFirstEmpty = FALSE;
}
if (!(GetWindowLongW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
......@@ -821,7 +821,7 @@ INT DIALOG_DoDialogBox( HWND hwnd, HWND owner )
if (bFirstEmpty && msg.message == WM_TIMER)
{
ShowWindow( hwnd, SW_SHOWNORMAL );
NtUserShowWindow( hwnd, SW_SHOWNORMAL );
bFirstEmpty = FALSE;
}
}
......
......@@ -95,11 +95,6 @@ static void CDECL nulldrv_SetWindowText( HWND hwnd, LPCWSTR text )
{
}
static UINT CDECL nulldrv_ShowWindow( HWND hwnd, INT cmd, RECT *rect, UINT swp )
{
return ~0; /* use default implementation */
}
static LRESULT CDECL nulldrv_SysCommand( HWND hwnd, WPARAM wparam, LPARAM lparam )
{
return -1;
......@@ -184,7 +179,7 @@ static struct user_driver_funcs lazy_load_driver =
nulldrv_SetWindowIcon,
NULL,
nulldrv_SetWindowText,
nulldrv_ShowWindow,
NULL,
nulldrv_SysCommand,
NULL,
NULL,
......@@ -222,7 +217,6 @@ void CDECL __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT v
SET_USER_FUNC(MsgWaitForMultipleObjectsEx);
SET_USER_FUNC(SetWindowIcon);
SET_USER_FUNC(SetWindowText);
SET_USER_FUNC(ShowWindow);
SET_USER_FUNC(SysCommand);
SET_USER_FUNC(WindowPosChanging);
SET_USER_FUNC(WindowPosChanged);
......
......@@ -514,13 +514,13 @@ static void MDI_SwitchActiveChild( MDICLIENTINFO *ci, HWND hwndTo, BOOL activate
{
/* restore old MDI child */
SendMessageW( hwndPrev, WM_SETREDRAW, FALSE, 0 );
ShowWindow( hwndPrev, SW_RESTORE );
NtUserShowWindow( hwndPrev, SW_RESTORE );
SendMessageW( hwndPrev, WM_SETREDRAW, TRUE, 0 );
/* activate new MDI child */
NtUserSetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE );
/* maximize new MDI child */
ShowWindow( hwndTo, SW_MAXIMIZE );
NtUserShowWindow( hwndTo, SW_MAXIMIZE );
}
/* activate new MDI child */
NtUserSetWindowPos( hwndTo, HWND_TOP, 0, 0, 0, 0,
......@@ -547,7 +547,7 @@ static LRESULT MDIDestroyChild( HWND client, MDICLIENTINFO *ci,
MDI_SwitchActiveChild(ci, next, TRUE);
else
{
ShowWindow(child, SW_HIDE);
NtUserShowWindow( child, SW_HIDE );
if (child == ci->hwndChildMaximized)
{
HWND frame = GetParent(client);
......@@ -1133,7 +1133,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 0;
case WM_MDIMAXIMIZE:
ShowWindow( (HWND)wParam, SW_MAXIMIZE );
NtUserShowWindow( (HWND)wParam, SW_MAXIMIZE );
return 0;
case WM_MDINEXT: /* lParam != 0 means previous window */
......@@ -1147,7 +1147,7 @@ LRESULT MDIClientWndProc_common( HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
case WM_MDIRESTORE:
ShowWindow( (HWND)wParam, SW_SHOWNORMAL );
NtUserShowWindow( (HWND)wParam, SW_SHOWNORMAL );
return 0;
case WM_MDISETMENU:
......@@ -1518,7 +1518,7 @@ LRESULT WINAPI DefMDIChildProcW( HWND hwnd, UINT message,
SendMessageW( hMaxChild, WM_SETREDRAW, FALSE, 0 );
MDI_RestoreFrameMenu( GetParent(client), hMaxChild );
ShowWindow( hMaxChild, SW_SHOWNOACTIVATE );
NtUserShowWindow( hMaxChild, SW_SHOWNOACTIVATE );
SendMessageW( hMaxChild, WM_SETREDRAW, TRUE, 0 );
}
......
......@@ -1857,21 +1857,12 @@ static void reply_message( struct received_message_info *info, LRESULT result, B
*/
LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam )
{
switch(msg)
{
case WM_WINE_SHOWWINDOW:
if (is_desktop_window( hwnd )) return 0;
return ShowWindow( hwnd, wparam );
default:
{
MSG m;
m.hwnd = hwnd;
m.message = msg;
m.wParam = wparam;
m.lParam = lparam;
return NtUserCallOneParam( (UINT_PTR)&m, NtUserHandleInternalMessage );
}
}
MSG m;
m.hwnd = hwnd;
m.message = msg;
m.wParam = wparam;
m.lParam = lparam;
return NtUserCallOneParam( (UINT_PTR)&m, NtUserHandleInternalMessage );
}
/* since the WM_DDE_ACK response to a WM_DDE_EXECUTE message should contain the handle
......
......@@ -1557,19 +1557,19 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
case SC_MINIMIZE:
ShowOwnedPopups(hwnd,FALSE);
ShowWindow( hwnd, SW_MINIMIZE );
NtUserShowWindow( hwnd, SW_MINIMIZE );
break;
case SC_MAXIMIZE:
if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_MAXIMIZE );
NtUserShowWindow( hwnd, SW_MAXIMIZE );
break;
case SC_RESTORE:
if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE);
ShowWindow( hwnd, SW_RESTORE );
NtUserShowWindow( hwnd, SW_RESTORE );
break;
case SC_CLOSE:
......
......@@ -1973,7 +1973,7 @@ static BOOL SCROLL_ShowScrollBar( HWND hwnd, INT nBar, BOOL fShowH, BOOL fShowV
switch(nBar)
{
case SB_CTL:
ShowWindow( hwnd, fShowH ? SW_SHOW : SW_HIDE );
NtUserShowWindow( hwnd, fShowH ? SW_SHOW : SW_HIDE );
return TRUE;
case SB_BOTH:
......
......@@ -740,8 +740,8 @@
@ stdcall ShowOwnedPopups(long long)
@ stdcall ShowScrollBar(long long long)
@ stub ShowStartGlass
@ stdcall ShowWindow(long long)
@ stdcall ShowWindowAsync(long long)
@ stdcall ShowWindow(long long) NtUserShowWindow
@ stdcall ShowWindowAsync(long long) NtUserShowWindowAsync
@ stdcall ShutdownBlockReasonCreate(long wstr)
@ stdcall ShutdownBlockReasonDestroy(long)
# @ stub SoftModalMessageBox
......
......@@ -166,7 +166,6 @@ static const struct user_callbacks user_funcs =
SendMessageW,
SendNotifyMessageW,
ShowCaret,
ShowWindow,
WaitForInputIdle,
free_win_ptr,
MENU_IsMenuActive,
......
......@@ -1023,10 +1023,10 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
{
/* if the new window is maximized don't bother repainting */
SendMessageW( top_child, WM_SETREDRAW, FALSE, 0 );
ShowWindow( top_child, SW_SHOWNORMAL );
NtUserShowWindow( top_child, SW_SHOWNORMAL );
SendMessageW( top_child, WM_SETREDRAW, TRUE, 0 );
}
else ShowWindow( top_child, SW_SHOWNORMAL );
else NtUserShowWindow( top_child, SW_SHOWNORMAL );
}
}
}
......@@ -1303,7 +1303,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
else if (cs->style & WS_MINIMIZE)
sw = SW_SHOWMINIMIZED;
ShowWindow( hwnd, sw );
NtUserShowWindow( hwnd, sw );
if (cs->dwExStyle & WS_EX_MDICHILD)
{
SendMessageW(cs->hwndParent, WM_MDIREFRESHMENU, 0, 0);
......@@ -1399,7 +1399,7 @@ HWND WINAPI DECLSPEC_HOTPATCH CreateWindowExW( DWORD exStyle, LPCWSTR className,
BOOL WINAPI CloseWindow( HWND hwnd )
{
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) return FALSE;
ShowWindow( hwnd, SW_MINIMIZE );
NtUserShowWindow( hwnd, SW_MINIMIZE );
return TRUE;
}
......@@ -1410,7 +1410,7 @@ BOOL WINAPI CloseWindow( HWND hwnd )
BOOL WINAPI OpenIcon( HWND hwnd )
{
if (!IsIconic( hwnd )) return FALSE;
ShowWindow( hwnd, SW_SHOWNORMAL );
NtUserShowWindow( hwnd, SW_SHOWNORMAL );
return TRUE;
}
......
......@@ -42,7 +42,6 @@ extern WND *WIN_GetPtr( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND WIN_GetFullHandle( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND WIN_IsCurrentProcess( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN;
extern UINT win_set_flags( HWND hwnd, UINT set_mask, UINT clear_mask ) DECLSPEC_HIDDEN;
extern ULONG WIN_SetStyle( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPEC_HIDDEN;
extern BOOL WIN_GetRectangles( HWND hwnd, enum coords_relative relative, RECT *rectWindow, RECT *rectClient ) DECLSPEC_HIDDEN;
extern HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module, BOOL unicode ) DECLSPEC_HIDDEN;
......@@ -94,9 +93,4 @@ static inline void mirror_rect( const RECT *window_rect, RECT *rect )
rect->right = width - tmp;
}
static inline UINT win_get_flags( HWND hwnd )
{
return win_set_flags( hwnd, 0, 0 );
}
#endif /* __WINE_WIN_H */
......@@ -67,7 +67,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(win);
*/
void WINAPI SwitchToThisWindow( HWND hwnd, BOOL alt_tab )
{
if (IsIconic( hwnd )) ShowWindow( hwnd, SW_RESTORE );
if (IsIconic( hwnd )) NtUserShowWindow( hwnd, SW_RESTORE );
else BringWindowToTop( hwnd );
}
......@@ -800,228 +800,6 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT cmd, LPRECT rect )
/***********************************************************************
* show_window
*
* Implementation of ShowWindow and ShowWindowAsync.
*/
static BOOL show_window( HWND hwnd, INT cmd )
{
WND *wndPtr;
HWND parent;
DPI_AWARENESS_CONTEXT context;
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
BOOL wasVisible = (style & WS_VISIBLE) != 0;
BOOL showFlag = TRUE;
RECT newPos = {0, 0, 0, 0};
UINT new_swp, swp = 0;
TRACE("hwnd=%p, cmd=%d, wasVisible %d\n", hwnd, cmd, wasVisible);
context = SetThreadDpiAwarenessContext( GetWindowDpiAwarenessContext( hwnd ));
switch(cmd)
{
case SW_HIDE:
if (!wasVisible) goto done;
showFlag = FALSE;
swp |= SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOMOVE;
if (style & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
break;
case SW_SHOWMINNOACTIVE:
case SW_MINIMIZE:
case SW_FORCEMINIMIZE: /* FIXME: Does not work if thread is hung. */
swp |= SWP_NOACTIVATE | SWP_NOZORDER;
/* fall through */
case SW_SHOWMINIMIZED:
swp |= SWP_SHOWWINDOW | SWP_FRAMECHANGED;
swp |= WINPOS_MinMaximize( hwnd, cmd, &newPos );
if ((style & WS_MINIMIZE) && wasVisible) goto done;
break;
case SW_SHOWMAXIMIZED: /* same as SW_MAXIMIZE */
if (!wasVisible) swp |= SWP_SHOWWINDOW;
swp |= SWP_FRAMECHANGED;
swp |= WINPOS_MinMaximize( hwnd, SW_MAXIMIZE, &newPos );
if ((style & WS_MAXIMIZE) && wasVisible) goto done;
break;
case SW_SHOWNA:
swp |= SWP_NOACTIVATE | SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
if (style & WS_CHILD) swp |= SWP_NOZORDER;
break;
case SW_SHOW:
if (wasVisible) goto done;
swp |= SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE;
if (style & WS_CHILD) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
break;
case SW_SHOWNOACTIVATE:
swp |= SWP_NOACTIVATE | SWP_NOZORDER;
/* fall through */
case SW_RESTORE:
/* fall through */
case SW_SHOWNORMAL: /* same as SW_NORMAL: */
case SW_SHOWDEFAULT: /* FIXME: should have its own handler */
if (!wasVisible) swp |= SWP_SHOWWINDOW;
if (style & (WS_MINIMIZE | WS_MAXIMIZE))
{
swp |= SWP_FRAMECHANGED;
swp |= WINPOS_MinMaximize( hwnd, cmd, &newPos );
}
else
{
if (wasVisible) goto done;
swp |= SWP_NOSIZE | SWP_NOMOVE;
}
if (style & WS_CHILD && !(swp & SWP_STATECHANGED)) swp |= SWP_NOACTIVATE | SWP_NOZORDER;
break;
default:
goto done;
}
if ((showFlag != wasVisible || cmd == SW_SHOWNA) && cmd != SW_SHOWMAXIMIZED && !(swp & SWP_STATECHANGED))
{
SendMessageW( hwnd, WM_SHOWWINDOW, showFlag, 0 );
if (!IsWindow( hwnd )) goto done;
}
if (IsRectEmpty( &newPos )) new_swp = swp;
else if ((new_swp = USER_Driver->pShowWindow( hwnd, cmd, &newPos, swp )) == ~0)
{
if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) new_swp = swp;
else if (IsIconic( hwnd ) && (newPos.left != -32000 || newPos.top != -32000))
{
OffsetRect( &newPos, -32000 - newPos.left, -32000 - newPos.top );
new_swp = swp & ~(SWP_NOMOVE | SWP_NOCLIENTMOVE);
}
else new_swp = swp;
}
swp = new_swp;
parent = NtUserGetAncestor( hwnd, GA_PARENT );
if (parent && !IsWindowVisible( parent ) && !(swp & SWP_STATECHANGED))
{
/* if parent is not visible simply toggle WS_VISIBLE and return */
if (showFlag) WIN_SetStyle( hwnd, WS_VISIBLE, 0 );
else WIN_SetStyle( hwnd, 0, WS_VISIBLE );
}
else
NtUserSetWindowPos( hwnd, HWND_TOP, newPos.left, newPos.top,
newPos.right - newPos.left, newPos.bottom - newPos.top, swp );
if (cmd == SW_HIDE)
{
HWND hFocus;
/* FIXME: This will cause the window to be activated irrespective
* of whether it is owned by the same thread. Has to be done
* asynchronously.
*/
if (hwnd == GetActiveWindow())
WINPOS_ActivateOtherWindow(hwnd);
/* Revert focus to parent */
hFocus = GetFocus();
if (hwnd == hFocus)
{
HWND parent = NtUserGetAncestor(hwnd, GA_PARENT);
if (parent == GetDesktopWindow()) parent = 0;
NtUserSetFocus( parent );
}
goto done;
}
if (!(wndPtr = WIN_GetPtr( hwnd )) || wndPtr == WND_OTHER_PROCESS) goto done;
if (wndPtr->flags & WIN_NEED_SIZE)
{
/* should happen only in CreateWindowEx() */
int wParam = SIZE_RESTORED;
RECT client;
LPARAM lparam;
WIN_GetRectangles( hwnd, COORDS_PARENT, NULL, &client );
lparam = MAKELONG( client.right - client.left, client.bottom - client.top );
wndPtr->flags &= ~WIN_NEED_SIZE;
if (wndPtr->dwStyle & WS_MAXIMIZE) wParam = SIZE_MAXIMIZED;
else if (wndPtr->dwStyle & WS_MINIMIZE)
{
wParam = SIZE_MINIMIZED;
lparam = 0;
}
WIN_ReleasePtr( wndPtr );
SendMessageW( hwnd, WM_SIZE, wParam, lparam );
SendMessageW( hwnd, WM_MOVE, 0, MAKELONG( client.left, client.top ));
}
else WIN_ReleasePtr( wndPtr );
/* if previous state was minimized Windows sets focus to the window */
if (style & WS_MINIMIZE)
{
NtUserSetFocus( hwnd );
/* Send a WM_ACTIVATE message for a top level window, even if the window is already active */
if (NtUserGetAncestor( hwnd, GA_ROOT ) == hwnd && !(swp & SWP_NOACTIVATE))
SendMessageW( hwnd, WM_ACTIVATE, WA_ACTIVE, 0 );
}
done:
SetThreadDpiAwarenessContext( context );
return wasVisible;
}
/***********************************************************************
* ShowWindowAsync (USER32.@)
*
* doesn't wait; returns immediately.
* used by threads to toggle windows in other (possibly hanging) threads
*/
BOOL WINAPI ShowWindowAsync( HWND hwnd, INT cmd )
{
HWND full_handle;
if (is_broadcast(hwnd))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
if ((full_handle = WIN_IsCurrentThread( hwnd )))
return show_window( full_handle, cmd );
return SendNotifyMessageW( hwnd, WM_WINE_SHOWWINDOW, cmd, 0 );
}
/***********************************************************************
* ShowWindow (USER32.@)
*/
BOOL WINAPI ShowWindow( HWND hwnd, INT cmd )
{
HWND full_handle;
if (is_broadcast(hwnd))
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
}
if ((full_handle = WIN_IsCurrentThread( hwnd )))
return show_window( full_handle, cmd );
if ((cmd == SW_HIDE) && !(GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
return FALSE;
if ((cmd == SW_SHOW) && (GetWindowLongW( hwnd, GWL_STYLE ) & WS_VISIBLE))
return TRUE;
return SendMessageW( hwnd, WM_WINE_SHOWWINDOW, cmd, 0 );
}
/***********************************************************************
* GetInternalWindowPos (USER32.@)
*/
UINT WINAPI GetInternalWindowPos( HWND hwnd, LPRECT rectWnd,
......@@ -1190,7 +968,7 @@ static BOOL WINPOS_SetPlacement( HWND hwnd, const WINDOWPLACEMENT *wndpl, UINT f
wp.rcNormalPosition.bottom - wp.rcNormalPosition.top,
SWP_NOZORDER | SWP_NOACTIVATE );
ShowWindow( hwnd, wndpl->showCmd );
NtUserShowWindow( hwnd, wndpl->showCmd );
if (IsIconic( hwnd ))
{
......@@ -1237,7 +1015,7 @@ BOOL WINAPI AnimateWindow(HWND hwnd, DWORD dwTime, DWORD dwFlags)
return FALSE;
}
ShowWindow(hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA));
NtUserShowWindow( hwnd, (dwFlags & AW_HIDE) ? SW_HIDE : ((dwFlags & AW_ACTIVATE) ? SW_SHOW : SW_SHOWNA) );
return TRUE;
}
......
......@@ -1202,6 +1202,7 @@ static const struct user_driver_funcs lazy_load_driver =
.pReleaseDC = nulldrv_ReleaseDC,
.pScrollDC = nulldrv_ScrollDC,
.pSetFocus = nulldrv_SetFocus,
.pShowWindow = nulldrv_ShowWindow,
.pUpdateLayeredWindow = loaderdrv_UpdateLayeredWindow,
.pWindowMessage = nulldrv_WindowMessage,
/* system parameters */
......
......@@ -1210,6 +1210,8 @@ static struct unix_funcs unix_funcs =
NtUserSetWindowRgn,
NtUserSetWindowWord,
NtUserShowCursor,
NtUserShowWindow,
NtUserShowWindowAsync,
NtUserSystemParametersInfo,
NtUserSystemParametersInfoForDpi,
NtUserToUnicodeEx,
......
......@@ -1162,7 +1162,7 @@ HWND get_active_window(void)
}
/* see GetFocus */
static HWND get_focus(void)
HWND get_focus(void)
{
GUITHREADINFO info;
info.cbSize = sizeof(info);
......
......@@ -46,6 +46,9 @@ LRESULT handle_internal_message( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lpar
case WM_WINE_SETWINDOWPOS:
if (is_desktop_window( hwnd )) return 0;
return set_window_pos( (WINDOWPOS *)lparam, 0, 0 );
case WM_WINE_SHOWWINDOW:
if (is_desktop_window( hwnd )) return 0;
return NtUserShowWindow( hwnd, wparam );
case WM_WINE_SETPARENT:
if (is_desktop_window( hwnd )) return 0;
return HandleToUlong( NtUserSetParent( hwnd, UlongToHandle(wparam) ));
......
......@@ -42,7 +42,6 @@ struct user_callbacks
LRESULT (WINAPI *pSendMessageW)( HWND, UINT, WPARAM, LPARAM );
BOOL (WINAPI *pSendNotifyMessageW)( HWND, UINT, WPARAM, LPARAM );
BOOL (WINAPI *pShowCaret)( HWND hwnd );
BOOL (WINAPI *pShowWindow)( HWND, INT );
DWORD (WINAPI *pWaitForInputIdle)( HANDLE, DWORD );
void (CDECL *free_win_ptr)( struct tagWND *win );
HWND (CDECL *is_menu_active)(void);
......@@ -278,6 +277,12 @@ HANDLE alloc_user_handle( struct user_object *ptr, unsigned int type ) DECLSPEC_
void *free_user_handle( HANDLE handle, unsigned int type ) DECLSPEC_HIDDEN;
void *get_user_handle_ptr( HANDLE handle, unsigned int type ) DECLSPEC_HIDDEN;
void release_user_handle_ptr( void *ptr ) DECLSPEC_HIDDEN;
UINT win_set_flags( HWND hwnd, UINT set_mask, UINT clear_mask ) DECLSPEC_HIDDEN;
static inline UINT win_get_flags( HWND hwnd )
{
return win_set_flags( hwnd, 0, 0 );
}
WND *get_win_ptr( HWND hwnd ) DECLSPEC_HIDDEN;
BOOL is_child( HWND parent, HWND child );
......
......@@ -1261,8 +1261,8 @@
@ stdcall NtUserShowCursor(long)
@ stub NtUserShowScrollBar
@ stub NtUserShowSystemCursor
@ stub NtUserShowWindow
@ stub NtUserShowWindowAsync
@ stdcall NtUserShowWindow(long long)
@ stdcall NtUserShowWindowAsync(long long)
@ stub NtUserShutdownBlockReasonCreate
@ stub NtUserShutdownBlockReasonQuery
@ stub NtUserShutdownReasonDestroy
......
......@@ -258,6 +258,8 @@ struct unix_funcs
int (WINAPI *pNtUserSetWindowRgn)( HWND hwnd, HRGN hrgn, BOOL redraw );
WORD (WINAPI *pNtUserSetWindowWord)( HWND hwnd, INT offset, WORD newval );
INT (WINAPI *pNtUserShowCursor)( BOOL show );
BOOL (WINAPI *pNtUserShowWindow)( HWND hwnd, INT cmd );
BOOL (WINAPI *pNtUserShowWindowAsync)( HWND hwnd, INT cmd );
BOOL (WINAPI *pNtUserSystemParametersInfo)( UINT action, UINT val, PVOID ptr, UINT winini );
BOOL (WINAPI *pNtUserSystemParametersInfoForDpi)( UINT action, UINT val, PVOID ptr,
UINT winini, UINT dpi );
......@@ -311,6 +313,7 @@ extern BOOL unhook_windows_hook( INT id, HOOKPROC proc ) DECLSPEC_HIDDEN;
extern LONG global_key_state_counter DECLSPEC_HIDDEN;
extern HWND get_active_window(void) DECLSPEC_HIDDEN;
extern BOOL get_cursor_pos( POINT *pt ) DECLSPEC_HIDDEN;
extern HWND get_focus(void) DECLSPEC_HIDDEN;
extern DWORD get_input_state(void) DECLSPEC_HIDDEN;
extern BOOL WINAPI release_capture(void) DECLSPEC_HIDDEN;
extern BOOL set_capture_window( HWND hwnd, UINT gui_flags, HWND *prev_ret ) DECLSPEC_HIDDEN;
......@@ -353,6 +356,7 @@ struct tagWND;
extern HDWP begin_defer_window_pos( INT count ) DECLSPEC_HIDDEN;
extern void destroy_thread_windows(void) DECLSPEC_HIDDEN;
extern LRESULT destroy_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern BOOL get_client_rect( HWND hwnd, RECT *rect ) DECLSPEC_HIDDEN;
extern HWND get_desktop_window(void) DECLSPEC_HIDDEN;
extern UINT get_dpi_for_window( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND get_full_window_handle( HWND hwnd ) DECLSPEC_HIDDEN;
......
......@@ -1075,6 +1075,18 @@ INT WINAPI NtUserShowCursor( BOOL show )
return unix_funcs->pNtUserShowCursor( show );
}
BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserShowWindowAsync( hwnd, cmd );
}
BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd )
{
if (!unix_funcs) return FALSE;
return unix_funcs->pNtUserShowWindow( hwnd, cmd );
}
BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, PVOID ptr, UINT winini )
{
if (!unix_funcs) return FALSE;
......
......@@ -422,6 +422,7 @@ HWINEVENTHOOK WINAPI NtUserSetWinEventHook( DWORD event_min, DWORD event_max, HM
DWORD pid, DWORD tid, DWORD flags );
INT WINAPI NtUserShowCursor( BOOL show );
BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd );
BOOL WINAPI NtUserShowWindowAsync( HWND hwnd, INT cmd );
BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT winini );
BOOL WINAPI NtUserSystemParametersInfoForDpi( UINT action, UINT val, PVOID ptr, UINT winini, UINT dpi );
INT WINAPI NtUserToUnicodeEx( UINT virt, UINT scan, const BYTE *state,
......
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