summaryrefslogtreecommitdiff
path: root/qutebrowser
diff options
context:
space:
mode:
authorlyeoh <tomentosus@gmail.com>2021-10-19 17:56:03 -0500
committerlyeoh <tomentosus@gmail.com>2021-11-01 15:13:58 -0500
commitd0e7732fccf0999dd3fb65a7d59fa72b0161dacd (patch)
tree5be1399b176b78f63220ad29160c601a26b0fdca /qutebrowser
parenta3af87958ed4223405127c38fc3877b69d8bf0ca (diff)
downloadqutebrowser-d0e7732fccf0999dd3fb65a7d59fa72b0161dacd.tar.gz
qutebrowser-d0e7732fccf0999dd3fb65a7d59fa72b0161dacd.zip
Add comment about intended 2s delay
Diffstat (limited to 'qutebrowser')
-rw-r--r--qutebrowser/mainwindow/tabbedbrowser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py
index 72403b49b..cf5671f16 100644
--- a/qutebrowser/mainwindow/tabbedbrowser.py
+++ b/qutebrowser/mainwindow/tabbedbrowser.py
@@ -221,8 +221,10 @@ class TabbedBrowser(QWidget):
self.cur_fullscreen_requested.connect(self.widget.tabBar().maybe_hide)
self.widget.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
- # WORKAROUND for recentlyAudibleChanged being emitted without delay
- # from the moment that the audio is paused
+ # Throttle calls to _on_audio_changed as WORKAROUND for recentlyAudibleChanged
+ # being emitted without delay from the moment that audio is dropped.
+ # delay_ms=2000 implements the intended two-second delay, specified at
+ # https://doc.qt.io/qt-5/qwebenginepage.html#recentlyAudibleChanged
self._on_audio_changed_throttle = throttle.Throttle(
self._on_audio_changed, delay_ms=2000, parent=self)