Only re-show the global search popup on focus events that were caused by the mouse or keyboard.
This commit is contained in:
parent
07528f844b
commit
8551d4a46d
@ -309,7 +309,23 @@ bool GlobalSearchWidget::EventFilterSearchWidget(QObject* o, QEvent* e) {
|
||||
return true;
|
||||
break;
|
||||
|
||||
case QEvent::FocusIn:
|
||||
case QEvent::FocusIn: {
|
||||
QFocusEvent* fe = static_cast<QFocusEvent*>(e);
|
||||
switch (fe->reason()) {
|
||||
case Qt::MouseFocusReason:
|
||||
case Qt::TabFocusReason:
|
||||
case Qt::BacktabFocusReason:
|
||||
if (!ui_->search->text().isEmpty())
|
||||
RepositionPopup();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case QEvent::MouseButtonPress:
|
||||
if (!ui_->search->text().isEmpty())
|
||||
RepositionPopup();
|
||||
|
Loading…
x
Reference in New Issue
Block a user