add WINIX_PLUGIN_QUIT and WINIX_QUIT plugins messages

While here:
- rename WINIX_CLOSE to WINIX_PREPARE_TO_CLOSE
This commit is contained in:
2022-04-25 16:34:26 +02:00
parent 92c7f90b95
commit 43ebbdaa33
3 changed files with 24 additions and 4 deletions

View File

@@ -408,7 +408,7 @@ void App::Close()
{
Winix::Lock lock(synchro);
plugin.Call((Winix::Session*)0, WINIX_CLOSE);
plugin.Call((Winix::Session*)0, WINIX_PREPARE_TO_CLOSE);
session_manager.SaveSessions();
session_manager.DeleteSessions();
@@ -421,6 +421,17 @@ void App::Close()
WaitForThreads();
// now all others threads are terminated
/*
* at the moment plugins are removed when winix is finishing
* but in the future we can add plug-in removal before the end
*/
plugin.Call(nullptr, WINIX_PLUGIN_QUIT);
/*
* this is the last message for plugins
*/
plugin.Call(nullptr, WINIX_QUIT);
}