Also focus when clicking on the current tab

Fixes issue #71
This commit is contained in:
Sergio Martins
2020-09-14 21:08:48 +01:00
parent 5293943a50
commit 85cb289bc4
3 changed files with 7 additions and 9 deletions

View File

@@ -88,6 +88,12 @@ void TabBarWidget::mousePressEvent(QMouseEvent *e)
{
onMousePress(e->pos());
QTabBar::mousePressEvent(e);
if ((Config::self().flags() & Config::Flag_TitleBarIsFocusable) && !frame()->isFocused()) {
// User clicked on a tab which was already focused
// A tab changing also counts as a change of scope
frame()->FocusScope::focus(Qt::MouseFocusReason);
}
}
void TabBarWidget::mouseMoveEvent(QMouseEvent *e)