Nikolay Sivov : comctl32/monthcal: Months popup menu should be placed at current pointer position.

Alexandre Julliard julliard at winehq.org
Tue Sep 29 11:09:09 CDT 2009


Module: wine
Branch: master
Commit: 30010f44d5684fa5f628c77bd5c688802e01a3c8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=30010f44d5684fa5f628c77bd5c688802e01a3c8

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Mon Sep 28 22:13:56 2009 +0400

comctl32/monthcal: Months popup menu should be placed at current pointer position.

---

 dlls/comctl32/monthcal.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/monthcal.c b/dlls/comctl32/monthcal.c
index e5f5b44..62c8dc8 100644
--- a/dlls/comctl32/monthcal.c
+++ b/dlls/comctl32/monthcal.c
@@ -1453,8 +1453,8 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
 	GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHNAME1+i, buf, countof(buf));
 	AppendMenuW(hMenu, MF_STRING|MF_ENABLED, i + 1, buf);
     }
-    menupoint.x = infoPtr->titlemonth.right;
-    menupoint.y = infoPtr->titlemonth.bottom;
+    menupoint.x = ht.pt.x;
+    menupoint.y = ht.pt.y;
     ClientToScreen(infoPtr->hwndSelf, &menupoint);
     i = TrackPopupMenu(hMenu,TPM_LEFTALIGN | TPM_NONOTIFY | TPM_RIGHTBUTTON | TPM_RETURNCMD,
 		       menupoint.x, menupoint.y, 0, infoPtr->hwndSelf, NULL);
@@ -1464,6 +1464,7 @@ MONTHCAL_LButtonDown(MONTHCAL_INFO *infoPtr, LPARAM lParam)
 	infoPtr->curSel.wMonth = i;
 	InvalidateRect(infoPtr->hwndSelf, NULL, FALSE);
     }
+    return 0;
   }
   case MCHT_TITLEYEAR:
   {




More information about the wine-cvs mailing list