mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 01:13:38 +00:00
win32u: Move NtUserSetShellWindowEx implementation from user32.
This commit is contained in:
parent
67c3fff7cd
commit
c8f1d41183
|
@ -55,55 +55,12 @@ HWND WINAPI GetFocus(void)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetShellWindowEx (USER32.@)
|
||||
* hwndShell = Progman[Program Manager]
|
||||
* |-> SHELLDLL_DefView
|
||||
* hwndListView = | |-> SysListView32
|
||||
* | | |-> tooltips_class32
|
||||
* | |
|
||||
* | |-> SysHeader32
|
||||
* |
|
||||
* |-> ProxyTarget
|
||||
*/
|
||||
BOOL WINAPI SetShellWindowEx(HWND hwndShell, HWND hwndListView)
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
if (GetShellWindow())
|
||||
return FALSE;
|
||||
|
||||
if (GetWindowLongW(hwndShell, GWL_EXSTYLE) & WS_EX_TOPMOST)
|
||||
return FALSE;
|
||||
|
||||
if (hwndListView != hwndShell)
|
||||
if (GetWindowLongW(hwndListView, GWL_EXSTYLE) & WS_EX_TOPMOST)
|
||||
return FALSE;
|
||||
|
||||
if (hwndListView && hwndListView!=hwndShell)
|
||||
NtUserSetWindowPos( hwndListView, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE );
|
||||
|
||||
NtUserSetWindowPos( hwndShell, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE|SWP_NOACTIVATE );
|
||||
|
||||
SERVER_START_REQ(set_global_windows)
|
||||
{
|
||||
req->flags = SET_GLOBAL_SHELL_WINDOWS;
|
||||
req->shell_window = wine_server_user_handle( hwndShell );
|
||||
req->shell_listview = wine_server_user_handle( hwndListView );
|
||||
ret = !wine_server_call_err(req);
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* SetShellWindow (USER32.@)
|
||||
*/
|
||||
BOOL WINAPI SetShellWindow(HWND hwndShell)
|
||||
BOOL WINAPI SetShellWindow( HWND hwnd )
|
||||
{
|
||||
return SetShellWindowEx(hwndShell, hwndShell);
|
||||
return NtUserSetShellWindowEx( hwnd, hwnd );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -708,7 +708,7 @@
|
|||
@ stdcall SetScrollPos(long long long long)
|
||||
@ stdcall SetScrollRange(long long long long long)
|
||||
@ stdcall SetShellWindow(long)
|
||||
@ stdcall SetShellWindowEx (long long)
|
||||
@ stdcall SetShellWindowEx(long long) NtUserSetShellWindowEx
|
||||
@ stdcall SetSysColors(long ptr ptr) NtUserSetSysColors
|
||||
@ stdcall SetSysColorsTemp(ptr ptr long)
|
||||
@ stdcall SetSystemCursor(long long)
|
||||
|
|
|
@ -2165,3 +2165,45 @@ HWND get_shell_window(void)
|
|||
|
||||
return hwnd;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* NtUserSetShellWindowEx (win32u.@)
|
||||
*/
|
||||
BOOL WINAPI NtUserSetShellWindowEx( HWND shell, HWND list_view )
|
||||
{
|
||||
BOOL ret;
|
||||
|
||||
/* shell = Progman[Program Manager]
|
||||
* |-> SHELLDLL_DefView
|
||||
* list_view = | |-> SysListView32
|
||||
* | | |-> tooltips_class32
|
||||
* | |
|
||||
* | |-> SysHeader32
|
||||
* |
|
||||
* |-> ProxyTarget
|
||||
*/
|
||||
|
||||
if (get_shell_window())
|
||||
return FALSE;
|
||||
|
||||
if (get_window_long( shell, GWL_EXSTYLE ) & WS_EX_TOPMOST)
|
||||
return FALSE;
|
||||
|
||||
if (list_view != shell && (get_window_long( list_view, GWL_EXSTYLE ) & WS_EX_TOPMOST))
|
||||
return FALSE;
|
||||
|
||||
if (list_view && list_view != shell)
|
||||
NtUserSetWindowPos( list_view, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE );
|
||||
|
||||
NtUserSetWindowPos( shell, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE );
|
||||
|
||||
SERVER_START_REQ(set_global_windows)
|
||||
{
|
||||
req->flags = SET_GLOBAL_SHELL_WINDOWS;
|
||||
req->shell_window = wine_server_user_handle( shell );
|
||||
req->shell_listview = wine_server_user_handle( list_view );
|
||||
ret = !wine_server_call_err(req);
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -273,6 +273,7 @@ static void * const syscalls[] =
|
|||
NtUserSetProcessWindowStation,
|
||||
NtUserSetProp,
|
||||
NtUserSetScrollInfo,
|
||||
NtUserSetShellWindowEx,
|
||||
NtUserSetSysColors,
|
||||
NtUserSetSystemMenu,
|
||||
NtUserSetSystemTimer,
|
||||
|
|
|
@ -1226,7 +1226,7 @@
|
|||
@ stdcall -syscall NtUserSetScrollInfo(long long ptr long)
|
||||
@ stub NtUserSetSensorPresence
|
||||
@ stub NtUserSetSharedWindowData
|
||||
@ stub NtUserSetShellWindowEx
|
||||
@ stdcall -syscall NtUserSetShellWindowEx(long long)
|
||||
@ stdcall -syscall NtUserSetSysColors(long ptr ptr)
|
||||
@ stub NtUserSetSystemCursor
|
||||
@ stdcall -syscall NtUserSetSystemMenu(long long)
|
||||
|
|
|
@ -259,6 +259,7 @@
|
|||
SYSCALL_ENTRY( NtUserSetProcessWindowStation ) \
|
||||
SYSCALL_ENTRY( NtUserSetProp ) \
|
||||
SYSCALL_ENTRY( NtUserSetScrollInfo ) \
|
||||
SYSCALL_ENTRY( NtUserSetShellWindowEx ) \
|
||||
SYSCALL_ENTRY( NtUserSetSysColors ) \
|
||||
SYSCALL_ENTRY( NtUserSetSystemMenu ) \
|
||||
SYSCALL_ENTRY( NtUserSetSystemTimer ) \
|
||||
|
|
|
@ -3624,6 +3624,14 @@ NTSTATUS WINAPI wow64_NtUserSetScrollInfo( UINT *args )
|
|||
return NtUserSetScrollInfo( hwnd, bar, info, redraw );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserSetShellWindowEx( UINT *args )
|
||||
{
|
||||
HWND shell = get_handle( &args );
|
||||
HWND list_view = get_handle( &args );
|
||||
|
||||
return NtUserSetShellWindowEx( shell, list_view );
|
||||
}
|
||||
|
||||
NTSTATUS WINAPI wow64_NtUserSetSysColors( UINT *args )
|
||||
{
|
||||
INT count = get_ulong( &args );
|
||||
|
|
|
@ -803,7 +803,6 @@ DWORD WINAPI NtUserMsgWaitForMultipleObjectsEx( DWORD count, const HANDLE *han
|
|||
DWORD timeout, DWORD mask, DWORD flags );
|
||||
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 );
|
||||
BOOL WINAPI NtUserOpenClipboard( HWND hwnd, ULONG unk );
|
||||
HDESK WINAPI NtUserOpenDesktop( OBJECT_ATTRIBUTES *attr, DWORD flags, ACCESS_MASK access );
|
||||
HDESK WINAPI NtUserOpenInputDesktop( DWORD flags, BOOL inherit, ACCESS_MASK access );
|
||||
|
@ -849,11 +848,13 @@ BOOL WINAPI NtUserSetLayeredWindowAttributes( HWND hwnd, COLORREF key, BYTE a
|
|||
BOOL WINAPI NtUserSetMenu( HWND hwnd, HMENU menu );
|
||||
BOOL WINAPI NtUserSetMenuContextHelpId( HMENU handle, DWORD id );
|
||||
BOOL WINAPI NtUserSetMenuDefaultItem( HMENU handle, UINT item, UINT bypos );
|
||||
BOOL WINAPI NtUserSetObjectInformation( HANDLE handle, INT index, void *info, DWORD len );
|
||||
HWND WINAPI NtUserSetParent( HWND hwnd, HWND parent );
|
||||
BOOL WINAPI NtUserSetProcessDpiAwarenessContext( ULONG awareness, ULONG unknown );
|
||||
BOOL WINAPI NtUserSetProcessWindowStation( HWINSTA handle );
|
||||
BOOL WINAPI NtUserSetProp( HWND hwnd, const WCHAR *str, HANDLE handle );
|
||||
INT WINAPI NtUserSetScrollInfo( HWND hwnd, INT bar, const SCROLLINFO *info, BOOL redraw );
|
||||
BOOL WINAPI NtUserSetShellWindowEx( HWND shell, HWND list_view );
|
||||
BOOL WINAPI NtUserSetSysColors( INT count, const INT *colors, const COLORREF *values );
|
||||
BOOL WINAPI NtUserSetSystemMenu( HWND hwnd, HMENU menu );
|
||||
UINT_PTR WINAPI NtUserSetSystemTimer( HWND hwnd, UINT_PTR id, UINT timeout );
|
||||
|
|
Loading…
Reference in a new issue