diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-16 18:32:17 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2014-05-16 18:32:17 +0900 |
commit | efdf0bbcd37d5aaa05649437b286aeecfd38c617 (patch) | |
tree | f056c88a705748c6b871fe4ba6f4e103bb37d822 /konsole/konsole/TEmulation.cpp | |
parent | 83708272fbd48b9a65342cc66af5c0a3837d7a13 (diff) | |
download | tdebase-efdf0bbcd37d5aaa05649437b286aeecfd38c617.tar.gz tdebase-efdf0bbcd37d5aaa05649437b286aeecfd38c617.zip |
Improved code for workaround for Qt/Tde/X? bug for handling Meta key as Alt key
in terminal emulation after restored sessions. This relates to bug 1026.
Diffstat (limited to 'konsole/konsole/TEmulation.cpp')
-rw-r--r-- | konsole/konsole/TEmulation.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/konsole/konsole/TEmulation.cpp b/konsole/konsole/TEmulation.cpp index d7cd13780..7576e9688 100644 --- a/konsole/konsole/TEmulation.cpp +++ b/konsole/konsole/TEmulation.cpp @@ -127,6 +127,8 @@ void TEmulation::connectGUI() this,TQT_SLOT(onKeyPress(TQKeyEvent*))); TQObject::connect(gui,TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)), this,TQT_SLOT(onKeyReleased(TQKeyEvent*))); + TQObject::connect(gui,TQT_SIGNAL(focusInSignal(TQFocusEvent*)), + this,TQT_SLOT(onFocusIn(TQFocusEvent*))); TQObject::connect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)), this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) ); TQObject::connect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)), @@ -157,6 +159,8 @@ void TEmulation::changeGUI(TEWidget* newgui) this,TQT_SLOT(onKeyPress(TQKeyEvent*))); TQObject::disconnect(gui,TQT_SIGNAL(keyReleasedSignal(TQKeyEvent*)), this,TQT_SLOT(onKeyReleased(TQKeyEvent*))); + TQObject::disconnect(gui,TQT_SIGNAL(focusInSignal(TQFocusEvent*)), + this,TQT_SLOT(onFocusIn(TQFocusEvent*))); TQObject::disconnect(gui,TQT_SIGNAL(beginSelectionSignal(const int,const int,const bool)), this,TQT_SLOT(onSelectionBegin(const int,const int,const bool)) ); TQObject::disconnect(gui,TQT_SIGNAL(extendSelectionSignal(const int,const int)), @@ -345,6 +349,20 @@ void TEmulation::doKeyReleased( TQKeyEvent* ke ) { } +void TEmulation::onFocusIn( TQFocusEvent* fe ) +{ + // HACK - workaround for what looks like a bug in Qt. + // Always reset the status of 'metaIsPressed' when the emulation gets the focus, + // to avoid pending cases. A pending case is a case where the emulation lost the + // focus while Meta was pressed but gets the focus when Meta is no longer pressed. + metaIsPressed = false; + doFocusIn(fe); +} + +void TEmulation::doFocusIn( TQFocusEvent* fe ) +{ +} + // Unblocking, Byte to Unicode translation --------------------------------- -- /* |