diff --git a/doc/help/settings.asciidoc b/doc/help/settings.asciidoc index 4a696bc5e..783796997 100644 --- a/doc/help/settings.asciidoc +++ b/doc/help/settings.asciidoc @@ -136,6 +136,8 @@ |<>|Allow websites to share screen content. |<>|Try to pre-fetch DNS entries to speed up browsing. |<>|Expand each subframe to its contents. +|<>|Set fullscreen notification overlay timeout in milliseconds. +|<>|Limit fullscreen to the browser window (does not expand to fill the screen). |<>|Allow websites to request geolocations. |<>|Value to send in the `Accept-Language` header. |<>|Custom headers for qutebrowser HTTP requests. @@ -177,7 +179,6 @@ |<>|List of user stylesheet filenames to use. |<>|Enable WebGL. |<>|Which interfaces to expose via WebRTC. -|<>|Limit fullscreen to the browser window (does not expand to fill the screen). |<>|Monitor load requests for cross-site scripting attempts. |<>|Directory to save downloads to. |<>|Prompt the user for the download location. @@ -1811,6 +1812,23 @@ Default: +pass:[false]+ This setting is only available with the QtWebKit backend. +[[content.fullscreen.overlay_timeout]] +=== content.fullscreen.overlay_timeout +Set fullscreen notification overlay timeout in milliseconds. +If set to 0, no overlay will be displayed. + +Type: <> + +Default: +pass:[3000]+ + +[[content.fullscreen.window]] +=== content.fullscreen.window +Limit fullscreen to the browser window (does not expand to fill the screen). + +Type: <> + +Default: +pass:[false]+ + [[content.geolocation]] === content.geolocation Allow websites to request geolocations. @@ -2344,14 +2362,6 @@ On QtWebEngine, this setting requires Qt 5.9.2 or newer. On QtWebKit, this setting is unavailable. -[[content.windowed_fullscreen]] -=== content.windowed_fullscreen -Limit fullscreen to the browser window (does not expand to fill the screen). - -Type: <> - -Default: +pass:[false]+ - [[content.xss_auditing]] === content.xss_auditing Monitor load requests for cross-site scripting attempts. diff --git a/qutebrowser/browser/webengine/webenginetab.py b/qutebrowser/browser/webengine/webenginetab.py index 34ba7a1ad..2d4e4609f 100644 --- a/qutebrowser/browser/webengine/webenginetab.py +++ b/qutebrowser/browser/webengine/webenginetab.py @@ -901,9 +901,11 @@ class _WebEnginePermissions(QObject): self._tab.data.fullscreen = on self._tab.fullscreen_requested.emit(on) if on: - notification = miscwidgets.FullscreenNotification(self._widget) - notification.show() - notification.set_timeout(3000) + timeout = config.instance.get('content.fullscreen.overlay_timeout') + if timeout != 0: + notification = miscwidgets.FullscreenNotification(self._widget) + notification.set_timeout(timeout) + notification.show() @pyqtSlot(QUrl, 'QWebEnginePage::Feature') def _on_feature_permission_requested(self, url, feature): diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index effb2271c..292dda355 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -401,11 +401,25 @@ content.unknown_url_scheme_policy: How navigation requests to URLs with unknown schemes are handled. content.windowed_fullscreen: + renamed: content.fullscreen.window + +content.fullscreen.window: type: Bool default: false desc: >- Limit fullscreen to the browser window (does not expand to fill the screen). +content.fullscreen.overlay_timeout: + type: + name: Int + minval: 0 + maxval: maxint + default: 3000 + desc: >- + Set fullscreen notification overlay timeout in milliseconds. + + If set to 0, no overlay will be displayed. + content.desktop_capture: type: BoolAsk default: ask diff --git a/qutebrowser/mainwindow/mainwindow.py b/qutebrowser/mainwindow/mainwindow.py index 2cdf64e1f..c32417750 100644 --- a/qutebrowser/mainwindow/mainwindow.py +++ b/qutebrowser/mainwindow/mainwindow.py @@ -577,7 +577,7 @@ class MainWindow(QWidget): @pyqtSlot(bool) def _on_fullscreen_requested(self, on): - if not config.val.content.windowed_fullscreen: + if not config.val.content.fullscreen.window: if on: self.state_before_fullscreen = self.windowState() self.setWindowState(Qt.WindowFullScreen | # type: ignore diff --git a/qutebrowser/misc/miscwidgets.py b/qutebrowser/misc/miscwidgets.py index 69bce56f5..39be3f15c 100644 --- a/qutebrowser/misc/miscwidgets.py +++ b/qutebrowser/misc/miscwidgets.py @@ -326,7 +326,7 @@ class FullscreenNotification(QLabel): self.setText("Page is now fullscreen.") self.resize(self.sizeHint()) - if config.val.content.windowed_fullscreen: + if config.val.content.fullscreen.window: geom = self.parentWidget().geometry() else: geom = QApplication.desktop().screenGeometry(self)