Stop terminal updates during processCloseWidget() is working

This commit is contained in:
Markus Gans 2016-07-06 23:11:49 +02:00
parent 11a7aad0ee
commit 2b40854e2f
4 changed files with 27 additions and 9 deletions

View File

@ -1,3 +1,6 @@
2016-07-06 Markus Gans <guru.mail@muenster.de>
* Stop terminal updates during processCloseWidget() is working
2016-07-03 Markus Gans <guru.mail@muenster.de> 2016-07-03 Markus Gans <guru.mail@muenster.de>
* Add the new class FDialogListMenu to switch between dialog menus * Add the new class FDialogListMenu to switch between dialog menus
* More consistent method names: * More consistent method names:

View File

@ -1244,6 +1244,7 @@ void FApplication::processTerminalUpdate()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FApplication::processCloseWidget() void FApplication::processCloseWidget()
{ {
updateTerminal(false);
if ( close_widget && ! close_widget->empty() ) if ( close_widget && ! close_widget->empty() )
{ {
widgetList::iterator iter; widgetList::iterator iter;
@ -1256,6 +1257,7 @@ void FApplication::processCloseWidget()
} }
close_widget->clear(); close_widget->clear();
} }
updateTerminal(true);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------

View File

@ -64,6 +64,7 @@ bool FTerm::linux_terminal;
bool FTerm::screen_terminal; bool FTerm::screen_terminal;
bool FTerm::tmux_terminal; bool FTerm::tmux_terminal;
bool FTerm::terminal_updates; bool FTerm::terminal_updates;
bool FTerm::stop_terminal_updates;
bool FTerm::vterm_updates; bool FTerm::vterm_updates;
bool FTerm::pc_charset_console; bool FTerm::pc_charset_console;
bool FTerm::utf8_input; bool FTerm::utf8_input;
@ -1598,6 +1599,7 @@ void FTerm::init()
mintty_terminal = \ mintty_terminal = \
screen_terminal = \ screen_terminal = \
tmux_terminal = \ tmux_terminal = \
stop_terminal_updates = \
background_color_erase = false; background_color_erase = false;
// term_attribute stores the current state of the terminal // term_attribute stores the current state of the terminal
@ -2996,7 +2998,8 @@ void FTerm::updateTerminal()
FApplication* fapp; FApplication* fapp;
int term_width, term_height; int term_width, term_height;
if ( static_cast<FApplication*>(term_object)->isQuit() ) if ( stop_terminal_updates
|| static_cast<FApplication*>(term_object)->isQuit() )
return; return;
if ( ! force_terminal_update ) if ( ! force_terminal_update )
@ -3078,6 +3081,14 @@ void FTerm::updateTerminal()
} }
} }
//----------------------------------------------------------------------
void FTerm::updateTerminal (bool on)
{
stop_terminal_updates = bool(! on);
if ( on )
updateTerminal();
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
void FTerm::setKDECursor (fc::kde_konsole_CursorShape style) void FTerm::setKDECursor (fc::kde_konsole_CursorShape style)
{ {

View File

@ -137,6 +137,7 @@ class FTerm
static bool screen_terminal; static bool screen_terminal;
static bool tmux_terminal; static bool tmux_terminal;
static bool terminal_updates; static bool terminal_updates;
static bool stop_terminal_updates;
static bool vterm_updates; static bool vterm_updates;
static bool background_color_erase; static bool background_color_erase;
static bool automatic_left_margin; static bool automatic_left_margin;
@ -312,6 +313,7 @@ class FTerm
static void resizeVTerm(); static void resizeVTerm();
static void putVTerm(); static void putVTerm();
static void updateTerminal(); static void updateTerminal();
static void updateTerminal (bool);
static void setKDECursor (fc::kde_konsole_CursorShape); static void setKDECursor (fc::kde_konsole_CursorShape);
static FString getXTermFont(); static FString getXTermFont();
static FString getXTermTitle(); static FString getXTermTitle();