aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-01-17 09:34:07 -0500
committerKen Moore <ken@ixsystems.com>2017-01-17 09:34:07 -0500
commit26155420d02ef6911781923dea69e1dd9ed49270 (patch)
tree33ff4205c38b87a658e46101879510beeb48bada /src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-26155420d02ef6911781923dea69e1dd9ed49270.tar.gz
lumina-26155420d02ef6911781923dea69e1dd9ed49270.tar.bz2
lumina-26155420d02ef6911781923dea69e1dd9ed49270.zip
Fix up some of the focus issues with the terminal and multiple tabs
Diffstat (limited to 'src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp')
-rw-r--r--src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp
index 15cfe047..812d3679 100644
--- a/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp
+++ b/src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp
@@ -31,6 +31,7 @@ TermWindow::TermWindow(QSettings *set) : QWidget(0, Qt::Window | Qt::BypassWindo
tabWidget->setTabsClosable(true);
tabWidget->setMovable(true);
tabWidget->setUsesScrollButtons(true);
+ tabWidget->setFocusPolicy(Qt::ClickFocus);
this->layout()->addWidget(tabWidget);
//Setup the animation
ANIM = new QPropertyAnimation(this, "geometry", this);
@@ -99,7 +100,7 @@ void TermWindow::OpenDirs(QStringList dirs){
page->setWhatsThis(ID);
tabWidget->addTab(page, ID);
tabWidget->setCurrentWidget(page);
- page->setFocus();
+ QTimer::singleShot(500, this, SLOT(focusOnWidget()));//page->setFocus();
qDebug() << "New Tab:" << ID << dirs[i];
connect(page, SIGNAL(ProcessClosed(QString)), this, SLOT(Close_Tab(QString)) );
}
@@ -255,6 +256,7 @@ void TermWindow::Prev_Tab(){
void TermWindow::focusOnWidget(){
if(tabWidget->currentWidget()!=0){
+ //qDebug() << "Focus on Widget";
tabWidget->currentWidget()->setFocus();
}
}
bgstack15