Commit 38b92f35 authored by Oswald Buddenhagen's avatar Oswald Buddenhagen Committed by Tomaz Canabrava
Browse files

make use of new KPty::setWinSize() overload

also remove the redundant pty()->setWinSize() call in the fallback
case, as it does the same as the subsequent code.
parent f3159503
......@@ -20,6 +20,7 @@
// KDE
#include <KPtyDevice>
#include <kpty_version.h>
using Konsole::Pty;
......@@ -85,13 +86,16 @@ void Pty::setWindowSize(int columns, int lines)
_windowLines = lines;
if (pty()->masterFd() >= 0) {
pty()->setWinSize(lines, columns);
pty()->setWinSize(_windowLines, _windowColumns, _windowHeight, _windowWidth);
struct winsize w;
w.ws_xpixel = _windowWidth;
w.ws_ypixel = _windowHeight;
w.ws_col = _windowColumns;
w.ws_row = _windowLines;
ioctl(pty()->masterFd(), TIOCSWINSZ, &w);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment