summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJekyll Wu <adaptee@gmail.com>2012-04-09 11:09:29 (GMT)
committerJekyll Wu <adaptee@gmail.com>2012-04-09 11:34:36 (GMT)
commitccfc3f859c5695cc08895570efd0831db0d3b9b0 (patch)
tree7a272bb6861b17ad9a59b2db20f4bbf448b759a5
parent9c79230a755d6908e726ad7075fdaae3124c997d (diff)
Introduce small delay to avoid updating Pty size too quickly
Some terminal application does not update its display when Pty size changes quickly in a row. Zsh seems a typical example. Thanks to Franz Fellner<alpine.art.de@googlemail.com> for the research and solution. BUG: 164099 BUG: 250212 FIXED-IN: 4.8.3
-rw-r--r--src/Session.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Session.cpp b/src/Session.cpp
index 3eb1a87..9562f98 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -27,6 +27,7 @@
// Standard
#include <stdlib.h>
#include <signal.h>
+#include <unistd.h>
// Qt
#include <QtGui/QApplication>
@@ -716,6 +717,7 @@ void Session::refresh()
const QSize existingSize = _shellProcess->windowSize();
_shellProcess->setWindowSize(existingSize.height(), existingSize.width() + 1);
+ usleep(10); // introduce small dealy to avoid changing size too quickly
_shellProcess->setWindowSize(existingSize.height(), existingSize.width());
}