From 8e152aaa0ac40a5200658d2b283cdf11b9d7ca0d Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 15 Aug 2023 09:22:30 +0200 Subject: Don't give keyboard focus to tab bar This partially solves #7820. The web view still loses focus for an unknown reason (apparently when swtiching out the rendering process?), but at least it regains focus now when the window is unfocused and then focused again. --- qutebrowser/mainwindow/tabwidget.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qutebrowser/mainwindow/tabwidget.py b/qutebrowser/mainwindow/tabwidget.py index 2e90c46c4..c0c7ee2ad 100644 --- a/qutebrowser/mainwindow/tabwidget.py +++ b/qutebrowser/mainwindow/tabwidget.py @@ -396,6 +396,7 @@ class TabBar(QTabBar): self._win_id = win_id self._our_style = TabBarStyle() self.setStyle(self._our_style) + self.setFocusPolicy(Qt.FocusPolicy.NoFocus) self.vertical = False self._auto_hide_timer = QTimer() self._auto_hide_timer.setSingleShot(True) -- cgit v1.2.3-54-g00ecf