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