Commit 35ac1b3f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move more WM_SYSCOMMAND handling from user32.

parent bed878dd
......@@ -1550,23 +1550,6 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
WINPOS_SysCommandSizeMove( hwnd, wParam );
break;
case SC_MINIMIZE:
ShowOwnedPopups(hwnd,FALSE);
NtUserShowWindow( hwnd, SW_MINIMIZE );
break;
case SC_MAXIMIZE:
if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE);
NtUserShowWindow( hwnd, SW_MAXIMIZE );
break;
case SC_RESTORE:
if (IsIconic(hwnd))
ShowOwnedPopups(hwnd,TRUE);
NtUserShowWindow( hwnd, SW_RESTORE );
break;
case SC_CLOSE:
return SendMessageW( hwnd, WM_CLOSE, 0, 0 );
......
......@@ -131,7 +131,27 @@ static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam )
if (!user_driver->pSysCommand( hwnd, wparam, lparam ))
return 0;
return 1;
switch (wparam & 0xfff0)
{
case SC_MINIMIZE:
show_owned_popups( hwnd, FALSE );
NtUserShowWindow( hwnd, SW_MINIMIZE );
break;
case SC_MAXIMIZE:
if (is_iconic(hwnd)) show_owned_popups( hwnd, TRUE );
NtUserShowWindow( hwnd, SW_MAXIMIZE );
break;
case SC_RESTORE:
if (is_iconic( hwnd )) show_owned_popups( hwnd, TRUE );
NtUserShowWindow( hwnd, SW_RESTORE );
break;
default:
return 1; /* handle on client side */
}
return 0;
}
LRESULT default_window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam, BOOL ansi )
......
......@@ -431,6 +431,7 @@ extern LONG_PTR set_window_long( HWND hwnd, INT offset, UINT size, LONG_PTR newv
BOOL ansi ) DECLSPEC_HIDDEN;
extern BOOL set_window_pos( WINDOWPOS *winpos, int parent_x, int parent_y ) DECLSPEC_HIDDEN;
extern ULONG set_window_style( HWND hwnd, ULONG set_bits, ULONG clear_bits ) DECLSPEC_HIDDEN;
extern BOOL show_owned_popups( HWND owner, BOOL show ) DECLSPEC_HIDDEN;
extern void update_window_state( HWND hwnd ) DECLSPEC_HIDDEN;
extern HWND window_from_point( HWND hwnd, POINT pt, INT *hittest ) DECLSPEC_HIDDEN;
......
......@@ -4238,7 +4238,7 @@ BOOL WINAPI NtUserShowWindow( HWND hwnd, INT cmd )
}
/* see ShowOwnedPopups */
static BOOL show_owned_popups( HWND owner, BOOL show )
BOOL show_owned_popups( HWND owner, BOOL show )
{
int count = 0;
HWND *win_array = list_window_children( 0, get_desktop_window(), NULL, 0 );
......
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