Author: jimtabor
Date: Sat May 21 00:24:38 2011
New Revision: 51833
URL:
http://svn.reactos.org/svn/reactos?rev=51833&view=rev
Log:
[User32]
- When active or inactive set the appropriate action so the correct keyboard mode can be
returned.
Modified:
trunk/reactos/dll/win32/user32/windows/dialog.c
Modified: trunk/reactos/dll/win32/user32/windows/dialog.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/d…
==============================================================================
--- trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/windows/dialog.c [iso-8859-1] Sat May 21 00:24:38 2011
@@ -39,7 +39,7 @@
#define DF_END 0x0001
#define DF_OWNERENABLED 0x0002
-#define DF_DIALOGACTIVE 0x4000
+#define DF_DIALOGACTIVE 0x4000 // ReactOS
#define DWLP_ROS_DIALOGINFO (DWLP_USER+sizeof(ULONG_PTR))
#define GETDLGINFO(hwnd) DIALOG_get_info(hwnd, FALSE)
#define SETDLGINFO(hwnd, info) SetWindowLongPtrW((hwnd), DWLP_ROS_DIALOGINFO,
(LONG_PTR)(info))
@@ -1143,7 +1143,13 @@
return DefWindowProcA( hwnd, msg, wParam, lParam );
case WM_ACTIVATE:
- NtUserSetThreadState(DF_DIALOGACTIVE,DF_DIALOGACTIVE);
+ { // ReactOS
+ DWORD dwSetFlag;
+ HWND hwndparent = DIALOG_FindMsgDestination( hwnd );
+ // if WA_CLICK/ACTIVE ? set dialog is active.
+ dwSetFlag = wParam ? DF_DIALOGACTIVE : 0;
+ if (hwndparent != hwnd) NtUserSetThreadState(dwSetFlag, DF_DIALOGACTIVE);
+ }
if (wParam) DEFDLG_RestoreFocus( hwnd );
else DEFDLG_SaveFocus( hwnd );
return 0;