Erich Hoover : hhctrl.ocx: Fix a double-click bug in the Contents tab introduced by the Index tab code .

Alexandre Julliard julliard at winehq.org
Fri Jan 29 10:56:36 CST 2010


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

Author: Erich Hoover <ehoover at mines.edu>
Date:   Thu Jan 28 16:16:02 2010 -0700

hhctrl.ocx: Fix a double-click bug in the Contents tab introduced by the Index tab code.

---

 dlls/hhctrl.ocx/help.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c
index 60614c2..e7b7a64 100644
--- a/dlls/hhctrl.ocx/help.c
+++ b/dlls/hhctrl.ocx/help.c
@@ -397,9 +397,8 @@ static LRESULT OnTabChange(HWND hwnd)
     return 0;
 }
 
-static LRESULT OnTopicChange(HWND hwnd, void *user_data)
+static LRESULT OnTopicChange(HHInfo *info, void *user_data)
 {
-    HHInfo *info = (HHInfo*)GetWindowLongPtrW(hwnd, GWLP_USERDATA);
     LPCWSTR chmfile = NULL, name = NULL, local = NULL;
     ContentItem *citer;
     IndexItem *iiter;
@@ -474,14 +473,17 @@ static LRESULT CALLBACK Child_WndProc(HWND hWnd, UINT message, WPARAM wParam, LP
     case WM_SIZE:
         return Child_OnSize(hWnd);
     case WM_NOTIFY: {
+        HHInfo *info = (HHInfo*)GetWindowLongPtrW(hWnd, GWLP_USERDATA);
         NMHDR *nmhdr = (NMHDR*)lParam;
+
         switch(nmhdr->code) {
         case TCN_SELCHANGE:
             return OnTabChange(hWnd);
         case TVN_SELCHANGEDW:
-            return OnTopicChange(hWnd, (void*)((NMTREEVIEWW *)lParam)->itemNew.lParam);
+            return OnTopicChange(info, (void*)((NMTREEVIEWW *)lParam)->itemNew.lParam);
         case NM_DBLCLK:
-            return OnTopicChange(hWnd, (void*)((NMITEMACTIVATE *)lParam)->lParam);
+            if(info->current_tab == TAB_INDEX)
+                return OnTopicChange(info, (void*)((NMITEMACTIVATE *)lParam)->lParam);
         }
         break;
     }




More information about the wine-cvs mailing list