From 26155420d02ef6911781923dea69e1dd9ed49270 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 17 Jan 2017 09:34:07 -0500 Subject: Fix up some of the focus issues with the terminal and multiple tabs --- src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src-qt5/desktop-utils/lumina-terminal/TermWindow.cpp') 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(); } } -- cgit