forked from Mirrors/wine-wine
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.oldstable
parent
cb133a12d0
commit
cbf820abb0
|
@ -842,12 +842,7 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
|
|||
switch (msg)
|
||||
{
|
||||
case WM_LBUTTONDOWN:
|
||||
if ((win->current_link = WINHELP_FindLink(win, lParam)))
|
||||
ret = TRUE;
|
||||
break;
|
||||
|
||||
case WM_LBUTTONUP:
|
||||
if ((link = WINHELP_FindLink(win, lParam)) && link == win->current_link)
|
||||
if ((link = WINHELP_FindLink(win, lParam)))
|
||||
{
|
||||
HLPFILE_WINDOWINFO* wi;
|
||||
|
||||
|
@ -882,7 +877,6 @@ static BOOL WINHELP_HandleTextMouse(WINHELP_WINDOW* win, UINT msg, LPARAM lParam
|
|||
}
|
||||
ret = TRUE;
|
||||
}
|
||||
win->current_link = NULL;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -917,11 +911,11 @@ 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;
|
||||
case WM_LBUTTONUP:
|
||||
case WM_LBUTTONDOWN:
|
||||
if (WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam) && msg == WM_LBUTTONDOWN)
|
||||
if (WINHELP_HandleTextMouse(Globals.active_popup, msg, lParam))
|
||||
return FALSE;
|
||||
/* fall through */
|
||||
case WM_LBUTTONUP:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_NCLBUTTONDOWN:
|
||||
|
|
|
@ -90,7 +90,6 @@ typedef struct tagWinHelp
|
|||
HBRUSH hBrush;
|
||||
|
||||
HLPFILE_WINDOWINFO* info;
|
||||
HLPFILE_LINK* current_link;
|
||||
|
||||
WINHELP_PAGESET back;
|
||||
unsigned font_scale; /* 0 = small, 1 = normal, 2 = large */
|
||||
|
|
Loading…
Reference in New Issue