┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorElvis Angelaccio <[email protected]>2018-06-13 21:42:41 +0200
committerElvis Angelaccio <[email protected]>2018-06-13 21:42:41 +0200
commit615838083dfe7ff6845069cc18a88d38be56a478 (patch)
tree9a65d77f9614906a7d226b82c6186c5c14c48f7c /src
parentd8cf33d563e1a608eb5bf75188a37379186029d9 (diff)
parent9616edbb66a8efbdd2bbc9be18e24aaf38a45b59 (diff)
Merge branch 'Applications/18.04'
Diffstat (limited to 'src')
-rw-r--r--src/search/dolphinsearchbox.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/search/dolphinsearchbox.cpp b/src/search/dolphinsearchbox.cpp
index 12f0c2138..61f5c2db4 100644
--- a/src/search/dolphinsearchbox.cpp
+++ b/src/search/dolphinsearchbox.cpp
@@ -231,10 +231,14 @@ bool DolphinSearchBox::eventFilter(QObject* obj, QEvent* event)
// #379135: we get the FocusIn event when we close a tab but we don't want to emit
// the activated() signal before the removeTab() call in DolphinTabWidget::closeTab() returns.
// To avoid this issue, we delay the activation of the search box.
- QTimer::singleShot(0, this, [this] {
- setActive(true);
- setFocus();
- });
+ // We also don't want to schedule the activation process if we are already active,
+ // otherwise we can enter in a loop of FocusIn/FocusOut events with the searchbox of another tab.
+ if (!isActive()) {
+ QTimer::singleShot(0, this, [this] {
+ setActive(true);
+ setFocus();
+ });
+ }
break;
default: