Emit signal on receiving escape sequence for changing terminal size

This is just one needed prerequisite for supporting the resizing
escape sequence. I still have no clear clue of adding the support
correctly
This commit is contained in:
Jekyll Wu
2012-03-09 15:16:42 +08:00
parent 8f3a1c1e07
commit 507619dff2
3 changed files with 11 additions and 1 deletions

View File

@@ -375,6 +375,12 @@ signals:
*/
void imageSizeInitialized();
/**
* Emitted after receiving the escape sequence which asks to change
* the terminal emulator's size
*/
void imageResizeRequest(const QSize& sizz);
/**
* Emitted when the terminal program requests to change various properties
* of the terminal display.

View File

@@ -141,6 +141,8 @@ Session::Session(QObject* parent) :
SLOT(onPrimaryScreenInUse(bool)));
connect(_emulation, SIGNAL(selectedText(QString)), this,
SLOT(onSelectedText(QString)));
connect( _emulation, SIGNAL(imageResizeRequest(QSize)) , this,
SIGNAL(resizeRequest(QSize)) );
//create new teletype for I/O with shell process
openTeletype(-1);

View File

@@ -544,7 +544,9 @@ void Vt102Emulation::processToken(int token, int p, int q)
case TY_ESC_DE('8' ) : _currentScreen->helpAlign ( ); break;
// resize = \e[8;<row>;<col>t
case TY_CSI_PS('t', 8) : setImageSize( p /*lines */, q /* columns */ ); break;
case TY_CSI_PS('t', 8) : setImageSize( p /*lines */, q /* columns */ );
emit imageResizeRequest(QSize(q, p));
break;
// change tab text color : \e[28;<color>t color: 0-16,777,215
case TY_CSI_PS('t', 28) : emit changeTabTextColorRequest ( p ); break;