]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
Move OS specific code to proper place. Also make sure that no other
[lyx.git] / src / LyX.cpp
index b7a409fedb4bad911fde2e801ffcddb488906c12..e2e5b0c925a9ab378eafcebc947449a845c0a93a 100644 (file)
@@ -71,9 +71,6 @@
 #include <stdlib.h>
 #include <string>
 #include <vector>
-#if defined(_WIN32) || defined(__CYGWIN__)
-#include <windows.h>
-#endif
 
 using namespace std;
 using namespace lyx::support;
@@ -653,18 +650,6 @@ static void error_handler(int err_sig)
        exit(0);
 }
 
-
-#if defined(_WIN32) || defined(__CYGWIN__)
-BOOL terminate_handler(DWORD event)
-{
-       if (event == CTRL_CLOSE_EVENT
-           || event == CTRL_LOGOFF_EVENT
-           || event == CTRL_SHUTDOWN_EVENT)
-               raise(SIGTERM);
-       return FALSE;
-}
-#endif
-
 }
 
 
@@ -686,10 +671,6 @@ bool LyX::init()
        signal(SIGINT, error_handler);
        signal(SIGTERM, error_handler);
        // SIGPIPE can be safely ignored.
-#if defined(_WIN32) || defined(__CYGWIN__)
-       // On Windows we have also to catch logging off or closing the console.
-       SetConsoleCtrlHandler((PHANDLER_ROUTINE)terminate_handler, TRUE);
-#endif
 
        lyxrc.tempdir_path = package().temp_dir().absFilename();
        lyxrc.document_path = package().document_dir().absFilename();