Eric Pouech : winhelp: Be sure to raise a newly (re) created window in all cases.

Alexandre Julliard julliard at winehq.org
Wed Apr 23 07:59:33 CDT 2008


Module: wine
Branch: master
Commit: dd39c1f90dd12223c3f90fe1f6c88023379dc1f1
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=dd39c1f90dd12223c3f90fe1f6c88023379dc1f1

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Tue Apr 22 22:01:33 2008 +0200

winhelp: Be sure to raise a newly (re)created window in all cases.

---

 programs/winhelp/winhelp.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index 73b0609..4a50c32 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -543,17 +543,27 @@ BOOL WINHELP_CreateHelpWindow(WINHELP_WNDPAGE* wpage, int nCmdShow, BOOL remembe
         {
             if (!lstrcmpi(win->lpszName, wpage->wininfo->name))
             {
+                POINT   pt = {0, 0};
+                SIZE    sz = {0, 0};
+                DWORD   flags = SWP_NOSIZE | SWP_NOMOVE;
+
                 WINHELP_DeleteButtons(win);
                 bReUsed = TRUE;
                 SetWindowText(win->hMainWnd, WINHELP_GetCaption(wpage));
                 if (wpage->wininfo->origin.x != CW_USEDEFAULT &&
                     wpage->wininfo->origin.y != CW_USEDEFAULT)
-                    SetWindowPos(win->hMainWnd, HWND_TOP,
-                                 wpage->wininfo->origin.x, wpage->wininfo->origin.y, 0, 0, SWP_NOSIZE);
+                {
+                    pt = wpage->wininfo->origin;
+                    flags &= ~SWP_NOSIZE;
+                }
                 if (wpage->wininfo->size.cx != CW_USEDEFAULT &&
                     wpage->wininfo->size.cy != CW_USEDEFAULT)
-                    SetWindowPos(win->hMainWnd, HWND_TOP,
-                                 0, 0, wpage->wininfo->size.cx, wpage->wininfo->size.cy, SWP_NOMOVE);
+                {
+                    sz = wpage->wininfo->size;
+                    flags &= ~SWP_NOMOVE;
+                }
+                SetWindowPos(win->hMainWnd, HWND_TOP, pt.x, pt.y, sz.cx, sz.cy, flags);
+
                 if (wpage->page && wpage->page->file != win->page->file)
                     WINHELP_DeleteBackSet(win);
                 WINHELP_InitFonts(win->hMainWnd);




More information about the wine-cvs mailing list