Author: gbrunmar
Date: Thu Oct 4 00:47:59 2007
New Revision: 29386
URL:
http://svn.reactos.org/svn/reactos?rev=29386&view=rev
Log:
Fixed bug 2555 (Calendar window does not close automaticaly)
See issue #2555 for more details.
Modified:
trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
trunk/reactos/dll/win32/comctl32/monthcal.c
Modified: trunk/reactos/dll/win32/comctl32/comctl32_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/comctl3…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/comctl32_ros.diff (original)
+++ trunk/reactos/dll/win32/comctl32/comctl32_ros.diff Thu Oct 4 00:47:59 2007
@@ -195,3 +195,31 @@
return 0;
}
+Index: monthcal.c
+===================================================================
+--- monthcal.c (revision 29360)
++++ monthcal.c (working copy)
+@@ -1703,11 +1703,12 @@
+
+
+ static LRESULT
+-MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr)
++MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr, HWND hFocusWnd)
+ {
+ TRACE("\n");
+
+- InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
++ if (infoPtr->hwndNotify != hFocusWnd)
++ ShowWindow(infoPtr->hwndSelf, SW_HIDE);
+
+ return 0;
+ }
+@@ -2015,7 +2016,7 @@
+ return DLGC_WANTARROWS | DLGC_WANTCHARS;
+
+ case WM_KILLFOCUS:
+- return MONTHCAL_KillFocus(infoPtr);
++ return MONTHCAL_KillFocus(infoPtr, wParam);
+
+ case WM_RBUTTONDOWN:
+ return MONTHCAL_RButtonDown(infoPtr, lParam);
Modified: trunk/reactos/dll/win32/comctl32/monthcal.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/monthca…
==============================================================================
--- trunk/reactos/dll/win32/comctl32/monthcal.c (original)
+++ trunk/reactos/dll/win32/comctl32/monthcal.c Thu Oct 4 00:47:59 2007
@@ -1703,11 +1703,12 @@
static LRESULT
-MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr)
+MONTHCAL_KillFocus(const MONTHCAL_INFO *infoPtr, HWND hFocusWnd)
{
TRACE("\n");
- InvalidateRect(infoPtr->hwndSelf, NULL, TRUE);
+ if (infoPtr->hwndNotify != hFocusWnd)
+ ShowWindow(infoPtr->hwndSelf, SW_HIDE);
return 0;
}
@@ -2015,7 +2016,7 @@
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_KILLFOCUS:
- return MONTHCAL_KillFocus(infoPtr);
+ return MONTHCAL_KillFocus(infoPtr, wParam);
case WM_RBUTTONDOWN:
return MONTHCAL_RButtonDown(infoPtr, lParam);