Summary: | Terminal Resize does not work | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Christopher Stone <chris.stone> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | RedHat Enterprise Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Christopher Stone
2004-12-28 16:17:20 UTC
I can confirmed that your program resizes xterm and not konsole. konsole produces this debugging output: undecodable token: \001b(hex)[8;50;80t undecodable token: \001b(hex)[8;50;80t undecodable token: \001b(hex)[8;50;80t I wonder if konsole resizing every worked... CVS commit by hindenburg: Allow xterm resize ESC code to work. Not the easiest code to understand... BUGS: 95932 M +10 -0 TEmuVt102.cpp 1.114 M +1 -0 TEmulation.h 1.36 M +13 -1 konsole.cpp 1.523 M +1 -0 konsole.h 1.203 --- kdebase/konsole/konsole/TEmuVt102.cpp #1.113:1.114 @@ -257,4 +257,5 @@ void TEmuVt102::pushToToken(int cc) #define SCS 16 #define GRP 32 +#define CPS 64 void TEmuVt102::initTokenizer() @@ -264,4 +265,6 @@ void TEmuVt102::initTokenizer() for(i = 32; i < 256; i++) tbl[ i] |= CHR; for(s = (UINT8*)"@ABCDGHILMPSTXZcdfry"; *s; s++) tbl[*s] |= CPN; +// resize = \e[8;<row>;<col>t + for(s = (UINT8*)"t"; *s; s++) tbl[*s] |= CPS; for(s = (UINT8*)"0123456789" ; *s; s++) tbl[*s] |= DIG; for(s = (UINT8*)"()+*%" ; *s; s++) tbl[*s] |= SCS; @@ -336,4 +339,8 @@ void TEmuVt102::onRcvChar(int cc) if (lec(3,1,'#')) { tau( TY_ESC_DE(s[2]), 0, 0); resetToken(); return; } if (eps( CPN)) { tau( TY_CSI_PN(cc), argv[0],argv[1]); resetToken(); return; } + +// resize = \e[8;<row>;<col>t + if (eps( CPS)) { tau( TY_CSI_PS(cc, argv[0]), argv[1], argv[2]); resetToken(); return; } + if (epe( )) { tau( TY_CSI_PE(cc), 0, 0); resetToken(); return; } if (ees( DIG)) { addDigit(cc-'0'); return; } @@ -506,4 +513,7 @@ switch( N ) case TY_ESC_DE('8' ) : scr->helpAlign ( ); break; +// resize = \e[8;<row>;<col>t + case TY_CSI_PS('t', 8) : changeColLin( q /* col */, p /* lin */ ); break; + case TY_CSI_PS('K', 0) : scr->clearToEndOfLine ( ); break; case TY_CSI_PS('K', 1) : scr->clearToBeginOfLine ( ); break; --- kdebase/konsole/konsole/TEmulation.h #1.35:1.36 @@ -69,4 +69,5 @@ signals: void ImageSizeChanged(int lines, int columns); void changeColumns(int columns); + void changeColLin(int columns, int lines); void changeTitle(int arg, const char* str); void notifySessionState(int state); --- kdebase/konsole/konsole/konsole.h #1.202:1.203 @@ -157,4 +157,5 @@ private slots: void changeColumns(int); + void changeColLin(int columns, int lines); void notifySessionState(TESession* session,int state); void notifySize(int columns, int lines); --- kdebase/konsole/konsole/konsole.cpp #1.522:1.523 @@ -1947,6 +1947,14 @@ void Konsole::reparseConfiguration() } -// --| color selection |------------------------------------------------------- +// Called from emulation +void Konsole::changeColLin(int columns, int lines) +{ + if (b_allowResize && !b_fixedSize) { + setColLin(columns, lines); + te->update(); + } +} +// Called from emulation void Konsole::changeColumns(int columns) { @@ -2624,4 +2632,6 @@ QString Konsole::newSession(KSimpleConfi connect( s->getEmulation(), SIGNAL(changeColumns(int)), this, SLOT(changeColumns(int)) ); + connect( s->getEmulation(), SIGNAL(changeColLin(int,int)), + this, SLOT(changeColLin(int,int)) ); connect( s->getEmulation(), SIGNAL(ImageSizeChanged(int,int)), this, SLOT(notifySize(int,int))); @@ -3352,4 +3362,5 @@ void Konsole::detachSession(TESession* _ disconnect( _se->getEmulation(),SIGNAL(ImageSizeChanged(int,int)), this,SLOT(notifySize(int,int))); + disconnect( _se->getEmulation(),SIGNAL(changeColLin(int, int)), this,SLOT(changeColLin(int,int)) ); disconnect( _se->getEmulation(),SIGNAL(changeColumns(int)), this,SLOT(changeColumns(int)) ); @@ -3450,4 +3461,5 @@ void Konsole::attachSession(TESession* s connect( session->getEmulation(),SIGNAL(ImageSizeChanged(int,int)), this,SLOT(notifySize(int,int))); connect( session->getEmulation(),SIGNAL(changeColumns(int)), this,SLOT(changeColumns(int)) ); + connect( session->getEmulation(),SIGNAL(changeColLin(int, int)), this,SLOT(changeColLin(int,int)) ); activateSession(session); |