Author: jimtabor
Date: Sun Aug 7 23:52:43 2016
New Revision: 72155
URL:
http://svn.reactos.org/svn/reactos?rev=72155&view=rev
Log:
[User32]
- Fix bug that was uncovered by r72143. See CORE-11810.
- Move System Commands to server side. Leaving Alt-Tab and Scrolls.
Modified:
trunk/reactos/win32ss/user/user32/windows/defwnd.c
Modified: trunk/reactos/win32ss/user/user32/windows/defwnd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
==============================================================================
--- trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/windows/defwnd.c [iso-8859-1] Sun Aug 7 23:52:43
2016
@@ -163,6 +163,11 @@
case SC_MOUSEMENU:
case SC_KEYMENU:
case SC_SCREENSAVE:
+ case SC_MINIMIZE:
+ case SC_MAXIMIZE:
+ case SC_RESTORE:
+ case SC_CLOSE:
+ case SC_HOTKEY:
NtUserMessageCall( hWnd, WM_SYSCOMMAND, wParam, lParam, (ULONG_PTR)&lResult,
FNID_DEFWINDOWPROC, FALSE);
return 0;
@@ -179,27 +184,6 @@
switch (wParam & 0xfff0)
{
- case SC_MINIMIZE:
- if (hWnd == GetActiveWindow())
- ShowOwnedPopups(hWnd,FALSE);
- ShowWindow( hWnd, SW_MINIMIZE );
- break;
-
- case SC_MAXIMIZE:
- if (IsIconic(hWnd) && hWnd == GetActiveWindow())
- ShowOwnedPopups(hWnd,TRUE);
- ShowWindow( hWnd, SW_MAXIMIZE );
- break;
-
- case SC_RESTORE:
- if (IsIconic(hWnd) && hWnd == GetActiveWindow())
- ShowOwnedPopups(hWnd,TRUE);
- ShowWindow( hWnd, SW_RESTORE );
- break;
-
- case SC_CLOSE:
- return SendMessageW(hWnd, WM_CLOSE, 0, 0);
-
case SC_VSCROLL:
case SC_HSCROLL:
{
@@ -217,30 +201,6 @@
case SC_NEXTWINDOW:
case SC_PREVWINDOW:
DoAppSwitch( wParam, lParam);
- break;
-
- case SC_HOTKEY:
- {
- HWND hwnd, hWndLastActive;
- PWND pWnd;
-
- hwnd = (HWND)lParam;
- pWnd = ValidateHwnd(hwnd);
- if (pWnd)
- {
- hWndLastActive = GetLastActivePopup(hwnd);
- if (hWndLastActive)
- {
- hwnd = hWndLastActive;
- pWnd = ValidateHwnd(hwnd);
- }
- SetForegroundWindow(hwnd);
- if (pWnd->style & WS_MINIMIZE)
- {
- PostMessage(hwnd, WM_SYSCOMMAND, SC_RESTORE, 0);
- }
- }
- }
break;
default: