Prevent flickering when resizing terminals or redrawing the screen via ctrl-l

This commit is contained in:
Markus Gans 2021-05-04 20:36:41 +02:00
parent 8ab4c02f42
commit 07f6bda1ba
4 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2021-05-04 Markus Gans <guru.mail@muenster.de>
* Prevent flickering when resizing terminals or redrawing
the screen via ctrl-l
2021-05-02 Markus Gans <guru.mail@muenster.de> 2021-05-02 Markus Gans <guru.mail@muenster.de>
* Bugfix for sending multiple SIGWINCH signals from * Bugfix for sending multiple SIGWINCH signals from
gnome-terminal under Wayland gnome-terminal under Wayland

View File

@ -2058,7 +2058,8 @@ bool FVTerm::clearTerm (wchar_t fillchar) const
appendAttributes (next_attribute); appendAttributes (next_attribute);
if ( ! ( (cl || cd || cb) && (normal || ut) ) if ( ! ( (cl || cd || cb) && (normal || ut) )
|| fillchar != L' ' ) || fillchar != L' '
|| ! draw_completed )
{ {
return false; return false;
} }

View File

@ -949,7 +949,9 @@ void FWidget::resize()
resizeVTerm (term_geometry.getSize()); resizeVTerm (term_geometry.getSize());
resizeArea (term_geometry, getShadow(), getVirtualDesktop()); resizeArea (term_geometry, getShadow(), getVirtualDesktop());
startDrawing(); // Avoid flickering - no update during adjustment
adjustSizeGlobal(); adjustSizeGlobal();
finishDrawing();
} }
else else
adjustSize(); adjustSize();

View File

@ -258,8 +258,14 @@ void FTermDataTest::dataTest()
CPPUNIT_ASSERT ( data.isMonochron() == true ); CPPUNIT_ASSERT ( data.isMonochron() == true );
CPPUNIT_ASSERT ( data.hasTermResized() == false ); CPPUNIT_ASSERT ( data.hasTermResized() == false );
data.setTermResized (true); data.setTermResized (true); // one signal
CPPUNIT_ASSERT ( data.hasTermResized() == true ); CPPUNIT_ASSERT ( data.hasTermResized() == true );
data.setTermResized (true); // two signals
CPPUNIT_ASSERT ( data.hasTermResized() == true );
data.setTermResized (false); // one signal
CPPUNIT_ASSERT ( data.hasTermResized() == true );
data.setTermResized (false); // no signal
CPPUNIT_ASSERT ( data.hasTermResized() == false );
} }