diff libgui/src/main-window.h @ 19336:37159a873c96 gui-release

preserve text on Windows terminal resize (bug #41893; patch #8532) * QWinTerminalImpl.h, QWinTerminalImpl.cpp (QConsolePrivate::updateConsoleSize): Don't shrink the size of the console buffer. Store the terminal size in the environment. Force the command line editor (usually readline) to notice the change in screen size as soon as possible. (QWinTerminalImpl::QWinTerminalImpl): Connect set_screen_size_signal with parent set_screen_size slot. (QWinTerminalImpl::set_screen_size_signal): New signal. * main-window.h, main-window.cc (main_window::int_pair): New typedef. (main_window::set_screen_size_callback): New callback function. (main_window::set_screen_size): New slot. * sysdep.cc (w32_init): New function. Tell command_editor to prefer environment variables for window size. (MINGW_init, MSVC_init): Call w32_init. (QWinTerminalImpl::setSize): Emit set_screen_size_signal.
author John W. Eaton <jwe@octave.org>
date Thu, 09 Oct 2014 19:20:56 -0400
parents b2c4d6d461f0
children c6615ca0a11d
line wrap: on
line diff
--- a/libgui/src/main-window.h	Mon Nov 03 22:39:49 2014 -0800
+++ b/libgui/src/main-window.h	Thu Oct 09 19:20:56 2014 -0400
@@ -69,6 +69,7 @@
 public:
 
   typedef std::pair <std::string, std::string> name_pair;
+  typedef std::pair <int, int> int_pair;
 
   main_window (QWidget *parent = 0);
 
@@ -196,6 +197,8 @@
   void set_global_shortcuts (bool enable);
   void set_global_edit_shortcuts (bool enable);
 
+  void set_screen_size (int ht, int wd);
+
   // handling the clipboard
   void clipboard_has_changed (QClipboard::Mode);
   void clear_clipboard ();
@@ -252,6 +255,8 @@
 
   void resize_command_window_callback (void);
 
+  void set_screen_size_callback (const int_pair&);
+
   void clear_workspace_callback (void);
 
   void clear_history_callback (void);