Author: hbelusca
Date: Sun Jun 5 14:29:28 2016
New Revision: 71535
URL: http://svn.reactos.org/svn/reactos?rev=71535&view=rev
Log:
[EXPLORER]: Also, sending direct WM_CLOSE messages to the traybar should not close it but instead popup the shutdown dialog. Addendum to r71533.
CORE-4351 CORE-8864
Modified:
trunk/reactos/base/shell/explorer/traywnd.cpp
Modified: trunk/reactos/base/shell/explorer/traywnd.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/traywn…
==============================================================================
--- trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/traywnd.cpp [iso-8859-1] Sun Jun 5 14:29:28 2016
@@ -2610,9 +2610,10 @@
LRESULT OnDoExitWindows(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
- /*
+ /*
* TWM_DOEXITWINDOWS is send by the CDesktopBrowser to us
- * to show the shutdown dialog.
+ * to show the shutdown dialog. Also a WM_CLOSE message sent
+ * by apps should show the dialog.
*/
return DoExitWindows();
}
@@ -2868,6 +2869,7 @@
MESSAGE_HANDLER(WM_APP_TRAYDESTROY, OnAppTrayDestroy)
MESSAGE_HANDLER(TWM_OPENSTARTMENU, OnOpenStartMenu)
MESSAGE_HANDLER(TWM_DOEXITWINDOWS, OnDoExitWindows)
+ MESSAGE_HANDLER(WM_CLOSE, OnDoExitWindows)
MESSAGE_HANDLER(WM_HOTKEY, OnHotkey)
ALT_MSG_MAP(1)
END_MSG_MAP()
Author: hbelusca
Date: Sun Jun 5 14:10:14 2016
New Revision: 71533
URL: http://svn.reactos.org/svn/reactos?rev=71533&view=rev
Log:
[SHELL32]: In some rare cases, pressing Alt-F4 in ReactOS when the desktop was on focus, just removed the desktop icons. The underlying "progman" window was indeed killed. Sending a WM_CLOSE message to it should not close it directly, but instead prompt the user with the Shutdown dialog. Tests on Windows show that it's indeed the case.
This fix completes r65557.
CORE-4351 CORE-8864
Modified:
trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
Modified: trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shelldes…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp [iso-8859-1] Sun Jun 5 14:10:14 2016
@@ -536,6 +536,9 @@
break;
}
+ case WM_CLOSE:
+ return pThis->_NotifyTray(TWM_DOEXITWINDOWS, 0, 0);
+
case WM_EXPLORER_OPEN_NEW_WINDOW:
TRACE("Proxy Desktop message 1035 received.\n");
SHOnCWMCommandLine((HANDLE)lParam);