Commit 5f57601a authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Tomaz Canabrava
Browse files

Use escape sequence CSI 14t to report screen size in pixels.

parent 7a27f407
......@@ -789,6 +789,7 @@ void Vt102Emulation::processToken(int token, int p, int q)
Q_EMIT imageResizeRequest(QSize(q, p)); // Note columns (x), rows (y) in QSize
break;
case token_csi_ps('t', 14) : reportPixelSize(); break;
case token_csi_ps('t', 18) : reportSize(); break;
// change tab text color : \e[28;<color>t color: 0-16,777,215
case token_csi_ps('t', 28) : /* IGNORED: konsole-specific KDE3-era extension, not implemented */ break;
......@@ -1128,6 +1129,17 @@ void Vt102Emulation::reportCursorPosition()
sendString(tmp);
}
void Vt102Emulation::reportPixelSize()
{
char tmp[30];
snprintf(tmp,
sizeof(tmp),
"\033[4;%d;%dt",
_currentScreen->currentTerminalDisplay()->contentRect().height(),
_currentScreen->currentTerminalDisplay()->contentRect().width());
sendString(tmp);
}
void Vt102Emulation::reportSize()
{
char tmp[30];
......
......@@ -146,6 +146,7 @@ private:
void reportStatus();
void reportAnswerBack();
void reportCursorPosition();
void reportPixelSize();
void reportSize();
void reportTerminalParms(int p);
......
Markdown is supported
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