[PATCH 2/2] Partial fix for #22979 (when opening a page, don't reopen the same page from macro, even if requested)

Eric Pouech eric.pouech at orange.fr
Wed Jun 2 15:22:53 CDT 2010




A+
---

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


diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c
index 2396917..1f92514 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));






More information about the wine-patches mailing list