]> git.lyx.org Git - lyx.git/blobdiff - src/support/os_win32.cpp
add argument to suppress event processing
[lyx.git] / src / support / os_win32.cpp
index b450bf1100553040659989ca325a4cf5b1873292..f244ecbdd4823e5c8e9906e0d20b1fcbdd4a66e7 100644 (file)
@@ -26,7 +26,6 @@
 
 #include "support/lassert.h"
 
-#include <csignal>
 #include <cstdlib>
 #include <vector>
 
@@ -72,6 +71,9 @@
 using namespace std;
 
 namespace lyx {
+
+void emergencyCleanup();
+
 namespace support {
 namespace os {
 
@@ -86,9 +88,7 @@ BOOL terminate_handler(DWORD event)
        if (event == CTRL_CLOSE_EVENT
            || event == CTRL_LOGOFF_EVENT
            || event == CTRL_SHUTDOWN_EVENT) {
-               ::raise(SIGTERM);
-               // Relinquish our time slice.
-               Sleep(0);
+               lyx::emergencyCleanup();
                return TRUE;
        }
        return FALSE;