Eric Pouech : winhelp: When following a link, don't do it into a popup, but its parent.

Alexandre Julliard julliard at winehq.org
Mon Jun 14 13:01:16 CDT 2010


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

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sun Jun 13 15:39:35 2010 +0200

winhelp: When following a link, don't do it into a popup, but its parent.

---

 programs/winhlp32/winhelp.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c
index a5a0f31..582ab3e 100644
--- a/programs/winhlp32/winhelp.c
+++ b/programs/winhlp32/winhelp.c
@@ -912,7 +912,10 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
                 if ((hlpfile = WINHELP_LookupHelpFile(link->string)))
                 {
                     if (link->window == -1)
+                    {
                         wi = win->info;
+                        if (wi->win_style & WS_POPUP) wi = Globals.active_win->info;
+                    }
                     else if (link->window < hlpfile->numWindows)
                         wi = &hlpfile->windows[link->window];
                     else
@@ -971,9 +974,10 @@ static BOOL WINHELP_CheckPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
             (HWND)lParam == Globals.active_popup->hMainWnd ||
             GetWindow((HWND)lParam, GW_OWNER) == Globals.active_win->hMainWnd)
             break;
+        /* fall through */
     case WM_LBUTTONDOWN:
-        if (WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam))
-            return FALSE;
+        if (msg == WM_LBUTTONDOWN)
+            WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam);
         /* fall through */
     case WM_MBUTTONDOWN:
     case WM_RBUTTONDOWN:




More information about the wine-cvs mailing list