From: Jacek Caban jacek@codeweavers.com
Signed-off-by: Jacek Caban jacek@codeweavers.com --- dlls/user32/nonclient.c | 12 ------------ dlls/win32u/defwnd.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/dlls/user32/nonclient.c b/dlls/user32/nonclient.c index 3844d42adba..0bcbbe54548 100644 --- a/dlls/user32/nonclient.c +++ b/dlls/user32/nonclient.c @@ -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; } diff --git a/dlls/win32u/defwnd.c b/dlls/win32u/defwnd.c index cf3fb25bbc0..2de4834be54 100644 --- a/dlls/win32u/defwnd.c +++ b/dlls/win32u/defwnd.c @@ -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 */ }