CShellWindow: handle dynamic window position, additional paint window only if not painted

Origin commit data
------------------
Commit: c8a4d7f6b9
Author: Thilo Graf <dbt@novatux.de>
Date: 2014-10-04 (Sat, 04 Oct 2014)
This commit is contained in:
2014-10-04 22:53:39 +02:00
parent 8f0b51bc58
commit 42210fb77c

View File

@@ -146,8 +146,9 @@ CShellWindow::CShellWindow(const std::string &command, const int _mode, int *res
txt += *it;
}
if (((lines_read == lines_max) && (lastPaint + 100000 < now)) || (lastPaint + 250000 < now)) {
textBox->setText(&txt);
textBox->paint();
textBox->setText(&txt, textBox->getWindowsPos().iWidth, false);
if (!textBox->isPainted())
textBox->paint();
lines_read = 0;
lastPaint = now;
dirty = false;
@@ -161,8 +162,9 @@ CShellWindow::CShellWindow(const std::string &command, const int _mode, int *res
gettimeofday(&tv,NULL);
now = (uint64_t) tv.tv_usec + (uint64_t)((uint64_t) tv.tv_sec * (uint64_t) 1000000);
if (!ok || (r < 1 && dirty && lastPaint + 250000 < now)) {
textBox->setText(&txt);
textBox->paint();
textBox->setText(&txt, textBox->getWindowsPos().iWidth, false);
if (!textBox->isPainted())
textBox->paint();
lastPaint = now;
dirty = false;
}