diff options
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clistmenus.cpp | 11 | ||||
-rw-r--r-- | src/core/stdclist/src/clistmenus.cpp | 7 |
3 files changed, 12 insertions, 16 deletions
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 367c1cda70..ab705cb225 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -130,14 +130,10 @@ static INT_PTR CloseAction(WPARAM, LPARAM) {
g_CluiData.bSTATE = STATE_PREPARETOEXIT; // workaround for avatar service and other wich destroys service on OK_TOEXIT
- bool k;
- do {
- k = Miranda_OkToExit();
- } while (!k);
-
- if (k)
- DestroyWindow(g_clistApi.hwndContactList);
+ while (!Miranda_OkToExit())
+ Sleep(100);
+ DestroyWindow(g_clistApi.hwndContactList);
return 0;
}
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index e0aba7057a..58a075f242 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -36,12 +36,11 @@ INT_PTR CloseAction(WPARAM, LPARAM) {
cfg::shutDown = 1;
- if (Miranda_OkToExit()) {
- DestroyWindow(g_clistApi.hwndContactList);
- PostQuitMessage(0);
- Sleep(0);
- }
-
+ while (!Miranda_OkToExit())
+ Sleep(100);
+
+ DestroyWindow(g_clistApi.hwndContactList);
+ PostQuitMessage(0);
return 0;
}
diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp index ccfc8a8241..81f248bf59 100644 --- a/src/core/stdclist/src/clistmenus.cpp +++ b/src/core/stdclist/src/clistmenus.cpp @@ -26,10 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static INT_PTR CloseAction(WPARAM, LPARAM)
{
- if (Miranda_OkToExit())
- DestroyWindow(g_clistApi.hwndContactList);
+ while (!Miranda_OkToExit())
+ Sleep(100);
- return(0);
+ DestroyWindow(g_clistApi.hwndContactList);
+ return 0;
}
void InitCustomMenus()
|