Author: hbelusca
Date: Sat Sep 17 22:44:50 2016
New Revision: 72720

URL: http://svn.reactos.org/svn/reactos?rev=72720&view=rev
Log:
[MSGINA][SHELL32]: Now that CORE-11979 is fixed, automatically close the 
logoff/shutdown dialog as soon as the user deactivates the window (focus lost) 
by e.g. pressing Alt-Tab.

Modified:
    trunk/reactos/dll/win32/msgina/shutdown.c
    trunk/reactos/dll/win32/shell32/dialogs/dialogs.cpp

Modified: trunk/reactos/dll/win32/msgina/shutdown.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/msgina/shutdown.c?rev=72720&r1=72719&r2=72720&view=diff
==============================================================================
--- trunk/reactos/dll/win32/msgina/shutdown.c   [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/msgina/shutdown.c   [iso-8859-1] Sat Sep 17 
22:44:50 2016
@@ -297,6 +297,13 @@
             if (pgContext)
                 DeleteObject(pgContext->hBitmap);
             return TRUE;
+        }
+
+        case WM_ACTIVATE:
+        {
+            if (LOWORD(wParam) == WA_INACTIVE)
+                EndDialog(hWnd, 0);
+            return FALSE;
         }
 
         case WM_PAINT:

Modified: trunk/reactos/dll/win32/shell32/dialogs/dialogs.cpp
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/dialogs/dialogs.cpp?rev=72720&r1=72719&r2=72720&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/dialogs/dialogs.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/dialogs/dialogs.cpp [iso-8859-1] Sat Sep 17 
22:44:50 2016
@@ -900,6 +900,13 @@
             EndDialog(hwnd, IDCANCEL);
             break;
 
+        case WM_ACTIVATE:
+        {
+            if (LOWORD(wParam) == WA_INACTIVE)
+                EndDialog(hwnd, 0);
+            return FALSE;
+        }
+
         case WM_COMMAND:
             switch (LOWORD(wParam))
             {


Reply via email to