From 73ecc22087896988a730d1471e54fc6aeaefec9c Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 26 Nov 2008 16:11:08 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : xvaga,dll Ricompilazione Demo : [ ] Commento : Disabilitato momentaneamente chiusura programmi terminati malamente: attualemte non ne rileva mai nessuno git-svn-id: svn://10.65.10.50/trunk@17729 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- xvaga/oswin32.cpp | 15 +++++++++++---- xvaga/xvtwin.cpp | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xvaga/oswin32.cpp b/xvaga/oswin32.cpp index 0d8a477db..58a1e3565 100755 --- a/xvaga/oswin32.cpp +++ b/xvaga/oswin32.cpp @@ -624,8 +624,11 @@ unsigned int OsWin32_FindMenuContainer() static BOOL CALLBACK CountChildrenProc(HWND hwnd, LPARAM lParam) { - LONG* n = (LONG*)lParam; - (*n)++; + if (lParam) + { + LONG* n = (LONG*)lParam; + (*n)++; + } return TRUE; } @@ -661,7 +664,10 @@ static BOOL CALLBACK CloseSiblingProc(HWND hwnd, LPARAM lParam) { ::GetWindowText(hwnd, str, sizeof(str)); if (str[0] == '\0') - ::PostMessage(hwnd, WM_ENDSESSION, 0, 0); + { + OsWin32_CloseChildren((UINT)hwnd); + CloseChildrenProc(hwnd, 0L); + } } } } @@ -670,7 +676,8 @@ static BOOL CALLBACK CloseSiblingProc(HWND hwnd, LPARAM lParam) void OsWin32_CloseSiblings(unsigned int parent) { - ::EnumWindows(CloseSiblingProc, parent); + // NON FUNZIONA!!!!!!!!!!!!!!!!!!!!!!!!!!! + // ::EnumWindows(CloseSiblingProc, parent); } /////////////////////////////////////////////////////////// diff --git a/xvaga/xvtwin.cpp b/xvaga/xvtwin.cpp index 57750e91d..fe39e6f2d 100755 --- a/xvaga/xvtwin.cpp +++ b/xvaga/xvtwin.cpp @@ -1153,6 +1153,7 @@ TTaskWin::~TTaskWin() xvt_res_free_menu_tree(m_menu); m_menu = NULL; } + wxExit(); // Exits main loop in the "rare" case it's still running } ///////////////////////////////////////////////////////////