Commit 4663446f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Move more WM_SYSCOMMAND implementation from user32.

parent 19e8cc96
......@@ -267,16 +267,11 @@ static void NC_TrackScrollBar( HWND hwnd, WPARAM wParam, POINT pt )
*/
LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
{
TRACE("hwnd %p WM_SYSCOMMAND %Ix %Ix\n", hwnd, wParam, lParam );
if (!NtUserMessageCall( hwnd, WM_SYSCOMMAND, wParam, lParam, 0, NtUserDefWindowProc, FALSE ))
return 0;
switch (wParam & 0xfff0)
{
case SC_CLOSE:
return SendMessageW( hwnd, WM_CLOSE, 0, 0 );
case SC_VSCROLL:
case SC_HSCROLL:
{
......@@ -308,13 +303,6 @@ LRESULT NC_HandleSysCommand( HWND hwnd, WPARAM wParam, LPARAM lParam )
}
}
break;
case SC_HOTKEY:
case SC_ARRANGE:
case SC_NEXTWINDOW:
case SC_PREVWINDOW:
FIXME("unimplemented WM_SYSCOMMAND %04Ix!\n", wParam);
break;
}
return 0;
}
......
......@@ -892,6 +892,8 @@ static void sys_command_size_move( HWND hwnd, WPARAM wparam )
static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam )
{
TRACE( "hwnd %p WM_SYSCOMMAND %lx %lx\n", hwnd, wparam, lparam );
if (!is_window_enabled( hwnd )) return 0;
if (call_hooks( WH_CBT, HCBT_SYSCOMMAND, wparam, lparam, TRUE ))
......@@ -917,6 +919,13 @@ static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam )
NtUserShowWindow( hwnd, SW_MAXIMIZE );
break;
case SC_CLOSE:
return send_message( hwnd, WM_CLOSE, 0, 0 );
case SC_VSCROLL:
case SC_HSCROLL:
return 1; /* FIXME: handle on client side */
case SC_MOUSEMENU:
track_mouse_menu_bar( hwnd, wparam & 0x000F, (short)LOWORD(lparam), (short)HIWORD(lparam) );
break;
......@@ -930,6 +939,17 @@ static LRESULT handle_sys_command( HWND hwnd, WPARAM wparam, LPARAM lparam )
NtUserShowWindow( hwnd, SW_RESTORE );
break;
case SC_TASKLIST:
case SC_SCREENSAVE:
return 1; /* FIXME: handle on client side */
case SC_HOTKEY:
case SC_ARRANGE:
case SC_NEXTWINDOW:
case SC_PREVWINDOW:
FIXME( "unimplemented WM_SYSCOMMAND %04lx\n", wparam );
break;
default:
return 1; /* handle on client side */
}
......
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