From 79af1859fa9096e45267492afe3abb7081902f74 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Wed, 2 Jun 2010 22:22:53 +0200 Subject: [PATCH] winhelp: When opening a page, don't reopen the same page from macro, even if requested. --- programs/winhlp32/winhelp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c index 2396917563a..1f92514ebc5 100644 --- a/programs/winhlp32/winhelp.c +++ b/programs/winhlp32/winhelp.c @@ -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));