summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qutebrowser/browser/mouse.py7
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py2
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py1
3 files changed, 7 insertions, 3 deletions
diff --git a/qutebrowser/browser/mouse.py b/qutebrowser/browser/mouse.py
index 16a7f227e..43d234322 100644
--- a/qutebrowser/browser/mouse.py
+++ b/qutebrowser/browser/mouse.py
@@ -22,7 +22,7 @@
from PyQt5.QtCore import QObject, QEvent, Qt, QTimer
from qutebrowser.config import config
-from qutebrowser.utils import message, log, usertypes
+from qutebrowser.utils import message, log, usertypes, qtutils
from qutebrowser.keyinput import modeman
@@ -54,6 +54,11 @@ class ChildEventFilter(QObject):
obj, child))
assert obj is self._widget
child.installEventFilter(self._filter)
+
+ if qtutils.version_check('5.11', compiled=False, exact=True):
+ # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68076
+ QTimer.singleShot(0, self._widget.setFocus)
+
return False
diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py
index 56bf197ec..a7b1446e1 100644
--- a/qutebrowser/browser/webengine/webenginetab.py
+++ b/qutebrowser/browser/webengine/webenginetab.py
@@ -780,8 +780,6 @@ class WebEngineTab(browsertab.AbstractTab):
url: The QUrl to open.
predict: If set to False, predicted_navigation is not emitted.
"""
- # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68076
- self._widget.setFocus()
self._saved_zoom = self.zoom.factor()
self._openurl_prepare(url, predict=predict)
self._widget.load(url)
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 2d674e280..a35e8d7ef 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -490,6 +490,7 @@ class TabbedBrowser(QWidget):
else:
self.widget.setCurrentWidget(tab)
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-68076
+ # Still seems to be needed with Qt 5.11.1
tab.setFocus()
tab.show()