summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-08-03 19:37:15 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-08-03 19:37:15 +0300
commita185b0078f635f7bc3a6e5fdf8579164732eb159 (patch)
treeb68c34caf0b387957502b2ba63b96736bd80cde5 /src/mir_app
parentf38fdd5fa8c435c42e31fcc8f99c796515355067 (diff)
core part of CloseAction went to the core
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/mir_app.def1
-rw-r--r--src/mir_app/src/mir_app64.def1
-rw-r--r--src/mir_app/src/miranda.cpp14
3 files changed, 16 insertions, 0 deletions
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def
index 210f167b8f..2820883800 100644
--- a/src/mir_app/src/mir_app.def
+++ b/src/mir_app/src/mir_app.def
@@ -1,6 +1,7 @@
LIBRARY mir_app.mir
EXPORTS
+Miranda_Close @1 NONAME
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def
index 132aa6225b..6ed7f2a46a 100644
--- a/src/mir_app/src/mir_app64.def
+++ b/src/mir_app/src/mir_app64.def
@@ -1,6 +1,7 @@
LIBRARY mir_app.mir
EXPORTS
+Miranda_Close @1 NONAME
CallProtoService @2
Skin_LoadProtoIcon @4
Skin_LoadIcon @5
diff --git a/src/mir_app/src/miranda.cpp b/src/mir_app/src/miranda.cpp
index 423f709d75..214a196012 100644
--- a/src/mir_app/src/miranda.cpp
+++ b/src/mir_app/src/miranda.cpp
@@ -427,6 +427,20 @@ MIR_APP_DLL(bool) Miranda_OkToExit()
return NotifyEventHooks(hOkToExitEvent, 0, 0) == 0;
}
+MIR_APP_DLL(void) Miranda_Close()
+{
+ while (!Miranda_OkToExit()) {
+ MSG msg;
+ while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE)) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ Sleep(0);
+ }
+
+ DestroyWindow(g_clistApi.hwndContactList);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
// version functions