summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlotte Van Petegem <charlotte@vanpetegem.me>2021-10-09 13:58:15 +0200
committerCharlotte Van Petegem <charlotte@vanpetegem.me>2021-10-09 14:00:32 +0200
commit887488f870424663917fd51f06ce3c202f0b2773 (patch)
tree87df5c93fc8c10a5b83bd35e923d4f5f33e98f9c
parentd7753009172d0ee0aac7898a01e61509ec24e8de (diff)
downloadqutebrowser-887488f870424663917fd51f06ce3c202f0b2773.tar.gz
qutebrowser-887488f870424663917fd51f06ce3c202f0b2773.zip
Move focus call to avoid crash
-rw-r--r--qutebrowser/browser/webengine/notification.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/qutebrowser/browser/webengine/notification.py b/qutebrowser/browser/webengine/notification.py
index 31f86f26e..a32981f64 100644
--- a/qutebrowser/browser/webengine/notification.py
+++ b/qutebrowser/browser/webengine/notification.py
@@ -361,7 +361,6 @@ class NotificationBridgePresenter(QObject):
log.misc.debug("Did not find matching notification, ignoring")
return
- self._focus_first_matching_tab(notification)
try:
notification.click()
except RuntimeError:
@@ -369,6 +368,8 @@ class NotificationBridgePresenter(QObject):
# https://www.riverbankcomputing.com/pipermail/pyqt/2020-May/042918.html
log.misc.debug(f"Ignoring click request for notification {notification_id} "
"due to PyQt bug")
+ return
+ self._focus_first_matching_tab(notification)
def _focus_first_matching_tab(self, notification: "QWebEngineNotification") -> None:
for win_id in objreg.window_registry: