Fixed bug 2555 (Calendar window does not close automaticaly)

See issue #2555 for more details.

svn path=/trunk/; revision=29386
This commit is contained in:
Gregor Brunmar
2007-10-03 20:47:59 +00:00
parent 6d5d5b6293
commit 79ce62a7c3
2 changed files with 32 additions and 3 deletions
@@ -195,3 +195,31 @@ Index: treeview.c
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);
+4 -3
View File
@@ -1703,11 +1703,12 @@ MONTHCAL_Paint(MONTHCAL_INFO *infoPtr, WPARAM wParam)
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 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
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);