diff libgui/src/octave-qt-link.cc @ 16658:591cb51c18a3

always handle CTRL-C as interrupt on windows systems * QTerminal.h (QTerminal::QTerminal): Don't set shortcuts for copy and paste. * octave-qt-link.cc (octave_qt_link::do_pre_input_event, octave_qt_link::do_post_input_event): Don't enable/disable processed input on Windows systems.
author John W. Eaton <jwe@octave.org>
date Tue, 14 May 2013 02:49:24 -0400
parents b04413e5a811
children c50ee84842a9
line wrap: on
line diff
--- a/libgui/src/octave-qt-link.cc	Tue May 14 02:49:07 2013 -0400
+++ b/libgui/src/octave-qt-link.cc	Tue May 14 02:49:24 2013 -0400
@@ -39,12 +39,6 @@
 
 #include "octave-qt-link.h"
 
-#if defined (Q_OS_WIN32)
-#define WIN32_LEAN_AND_MEAN
-#define _WIN32_WINNT 0x0500 
-#include <windows.h>
-#endif
-
 octave_qt_link::octave_qt_link (octave_main_thread *mt)
   : octave_link (), main_thread (mt)
 { }
@@ -377,25 +371,11 @@
 void
 octave_qt_link::do_pre_input_event (void)
 {
-#if defined (Q_OS_WIN32)
-  // Disable Ctrl-C processing on stdin.
-  HANDLE hStdIn = GetStdHandle (STD_INPUT_HANDLE);
-  DWORD mode;
-  GetConsoleMode (hStdIn, &mode);
-  SetConsoleMode (hStdIn, mode & ~ ENABLE_PROCESSED_INPUT);
-#endif
 }
 
 void
 octave_qt_link::do_post_input_event (void)
 {
-#if defined (Q_OS_WIN32)
-  // Enable Ctrl-C processing on stdin.
-  HANDLE hStdIn = GetStdHandle (STD_INPUT_HANDLE);
-  DWORD mode;
-  GetConsoleMode (hStdIn, &mode);
-  SetConsoleMode (hStdIn, mode | ENABLE_PROCESSED_INPUT);
-#endif
 }
 
 void