winhelp: When opening a page, don't reopen the same page from macro, even if requested.

This commit is contained in:
Eric Pouech 2010-06-02 22:22:53 +02:00 committed by Alexandre Julliard
parent 3acf62f5e7
commit 79af1859fa

View file

@ -716,6 +716,14 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
SIZE sz = {0, 0};
DWORD flags = SWP_NOSIZE | SWP_NOMOVE;
if (win->page == wpage->page && win->info == wpage->wininfo)
{
/* see #22979, some hlp files have a macro (run at page opening), which
* jumps to the very same page
* Exit gracefully in that case
*/
return TRUE;
}
WINHELP_DeleteButtons(win);
bReUsed = TRUE;
SetWindowText(win->hMainWnd, WINHELP_GetCaption(wpage));