Module: wine Branch: master Commit: 90fcc09d92c69feef8bcd25d2ea7fef177bca735 URL: http://source.winehq.org/git/wine.git/?a=commit;h=90fcc09d92c69feef8bcd25d2e...
Author: Jacek Caban jacek@codeweavers.com Date: Wed Feb 28 03:54:25 2007 +0100
hhctrl.ocx: Call PostQuitMessage only in hh.exe process.
---
dlls/hhctrl.ocx/help.c | 3 ++- dlls/hhctrl.ocx/hhctrl.c | 3 +++ dlls/hhctrl.ocx/hhctrl.h | 1 + 3 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/hhctrl.ocx/help.c b/dlls/hhctrl.ocx/help.c index e98eb82..abbc0c5 100644 --- a/dlls/hhctrl.ocx/help.c +++ b/dlls/hhctrl.ocx/help.c @@ -631,7 +631,8 @@ static LRESULT CALLBACK Help_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPA ReleaseHelpViewer((HHInfo *)GetWindowLongPtrW(hWnd, GWLP_USERDATA)); return 0; case WM_DESTROY: - PostQuitMessage(0); + if(hh_process) + PostQuitMessage(0); break;
default: diff --git a/dlls/hhctrl.ocx/hhctrl.c b/dlls/hhctrl.ocx/hhctrl.c index 0ab13bd..0c50aba 100644 --- a/dlls/hhctrl.ocx/hhctrl.c +++ b/dlls/hhctrl.ocx/hhctrl.c @@ -26,6 +26,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(htmlhelp);
HINSTANCE hhctrl_hinstance; +BOOL hh_process;
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved) { @@ -144,6 +145,8 @@ int WINAPI doWinMain(HINSTANCE hInstance, LPSTR szCmdLine) HHInfo *info; LPWSTR filename = strdupAtoW(szCmdLine);
+ hh_process = TRUE; + /* FIXME: Check szCmdLine for bad arguments */ info = CreateHelpViewer(filename); hhctrl_free(filename); diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index 9f2a9fa..0de19e2 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -142,5 +142,6 @@ static inline LPWSTR strdupAtoW(LPCSTR str) }
extern HINSTANCE hhctrl_hinstance; +extern BOOL hh_process;
#endif