mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-29 16:31:11 +02:00
CShellWindow: handle dynamic window position, additional paint window only if not painted
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user