diff --git a/ChangeLog b/ChangeLog index 64ad0c66..1ce89b29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2016-06-16 Markus Gans + * Bug fix in FTerm updateVTerm() for updates from vdesktop + 2016-06-13 Markus Gans * Improved title bar menu integration diff --git a/src/fdialog.cpp b/src/fdialog.cpp index 7b59bbc5..4ecae057 100644 --- a/src/fdialog.cpp +++ b/src/fdialog.cpp @@ -534,9 +534,9 @@ void FDialog::onMouseDown (FMouseEvent* ev) if ( old_focus ) old_focus->redraw(); } - else if ( focusFirstChild() ) - if ( old_focus ) - old_focus->redraw(); + else if ( old_focus && focusFirstChild() ) + old_focus->redraw(); + updateTerminal(); } if ( has_raised ) redraw(); diff --git a/src/fevent.h b/src/fevent.h index efe3e17b..8c6b6bfd 100644 --- a/src/fevent.h +++ b/src/fevent.h @@ -134,7 +134,7 @@ class FMouseEvent : public FEvent // mouse event #pragma pack(pop) - + //---------------------------------------------------------------------- // class FWheelEvent //---------------------------------------------------------------------- diff --git a/src/fterm.cpp b/src/fterm.cpp index 4e9257ca..944ba3e0 100644 --- a/src/fterm.cpp +++ b/src/fterm.cpp @@ -282,7 +282,7 @@ void FTerm::identifyTermType() // // Example: // linux tty1 - // vt100 ttys0 + // vt100 ttys0 FILE *fp; @@ -297,9 +297,9 @@ void FTerm::identifyTermType() // get term basename const char* term_basename = strrchr(term_name, '/'); if ( term_basename == 0 ) - term_basename = term_name; + term_basename = term_name; else - term_basename++; + term_basename++; // read and parse the file while ( fgets(str, sizeof(str)-1, fp) != 0 ) @@ -2369,6 +2369,7 @@ void FTerm::updateVTerm (FTerm::term_area* area) int ax, ay, aw, ah, rsh, bsh, y_end, ol; FOptiAttr::char_data* tc; // terminal character FOptiAttr::char_data* ac; // area character + bool modified = false; if ( ! vterm_updates ) { @@ -2430,8 +2431,11 @@ void FTerm::updateVTerm (FTerm::term_area* area) tc = &vterm->text[gy * vterm->width + gx - ol]; if ( ! isCovered(gx-ol, gy, area) ) + { memcpy (tc, ac, sizeof(FOptiAttr::char_data)); - else + modified = true; + } + else if ( ! modified ) line_xmin++; // don't update covered character } _xmin = ax + line_xmin - ol;