Commit cbf820ab authored by Dylan Smith's avatar Dylan Smith Committed by Alexandre Julliard

winhlp32: Links are clicked on WM_LBUTTONDOWN not WM_LBUTTONUP.

This behaviour was tested against native winhlp32 by pressing down the left mouse button and holding it while over the link to avoid having WM_LBUTTONUP sent. I noticed that the action for clicking the link happened right away, without waiting for me to release the mouse button.
parent cb133a12
...@@ -842,12 +842,7 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam ...@@ -842,12 +842,7 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
switch (msg) switch (msg)
{ {
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
if ((win->current_link = WINHELP_FindLink(win, lParam))) if ((link = WINHELP_FindLink(win, lParam)))
ret = TRUE;
break;
case WM_LBUTTONUP:
if ((link = WINHELP_FindLink(win, lParam)) && link == win->current_link)
{ {
HLPFILE_WINDOWINFO* wi; HLPFILE_WINDOWINFO* wi;
...@@ -882,7 +877,6 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam ...@@ -882,7 +877,6 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
} }
ret = TRUE; ret = TRUE;
} }
win->current_link = NULL;
break; break;
} }
return ret; return ret;
...@@ -917,11 +911,11 @@ static BOOL WINHELP_CheckPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam ...@@ -917,11 +911,11 @@ static BOOL WINHELP_CheckPopup(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam
(HWND)lParam == Globals.active_popup->hMainWnd || (HWND)lParam == Globals.active_popup->hMainWnd ||
GetWindow((HWND)lParam, GW_OWNER) == Globals.active_win->hMainWnd) GetWindow((HWND)lParam, GW_OWNER) == Globals.active_win->hMainWnd)
break; break;
case WM_LBUTTONUP:
case WM_LBUTTONDOWN: case WM_LBUTTONDOWN:
if (WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam) && msg == WM_LBUTTONDOWN) if (WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam))
return FALSE; return FALSE;
/* fall through */ /* fall through */
case WM_LBUTTONUP:
case WM_MBUTTONDOWN: case WM_MBUTTONDOWN:
case WM_RBUTTONDOWN: case WM_RBUTTONDOWN:
case WM_NCLBUTTONDOWN: case WM_NCLBUTTONDOWN:
......
...@@ -90,7 +90,6 @@ typedef struct tagWinHelp ...@@ -90,7 +90,6 @@ typedef struct tagWinHelp
HBRUSH hBrush; HBRUSH hBrush;
HLPFILE_WINDOWINFO* info; HLPFILE_WINDOWINFO* info;
HLPFILE_LINK* current_link;
WINHELP_PAGESET back; WINHELP_PAGESET back;
unsigned font_scale; /* 0 = small, 1 = normal, 2 = large */ unsigned font_scale; /* 0 = small, 1 = normal, 2 = large */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment