summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2020-04-20 18:11:04 +0200
committerFlorian Bruhin <me@the-compiler.org>2020-04-20 18:11:04 +0200
commit3c3eade1f58463a4fcf55e9792c9e4c65a2c67af (patch)
treeef7dbf91580ee35e0a1cf737b43ff5cbf342876f
parentc5936bd12b5329678498fbfddd9eacfa2039c2b0 (diff)
parente067dc75d87556bfc6243b804e059d7b5ff3ea0e (diff)
downloadqutebrowser-3c3eade1f58463a4fcf55e9792c9e4c65a2c67af.tar.gz
qutebrowser-3c3eade1f58463a4fcf55e9792c9e4c65a2c67af.zip
Merge remote-tracking branch 'origin/pr/5297'
-rw-r--r--doc/help/settings.asciidoc28
-rw-r--r--qutebrowser/browser/webengine/webenginetab.py8
-rw-r--r--qutebrowser/config/configdata.yml14
-rw-r--r--qutebrowser/mainwindow/mainwindow.py2
-rw-r--r--qutebrowser/misc/miscwidgets.py2
5 files changed, 40 insertions, 14 deletions
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 @@
|<<content.desktop_capture,content.desktop_capture>>|Allow websites to share screen content.
|<<content.dns_prefetch,content.dns_prefetch>>|Try to pre-fetch DNS entries to speed up browsing.
|<<content.frame_flattening,content.frame_flattening>>|Expand each subframe to its contents.
+|<<content.fullscreen.overlay_timeout,content.fullscreen.overlay_timeout>>|Set fullscreen notification overlay timeout in milliseconds.
+|<<content.fullscreen.window,content.fullscreen.window>>|Limit fullscreen to the browser window (does not expand to fill the screen).
|<<content.geolocation,content.geolocation>>|Allow websites to request geolocations.
|<<content.headers.accept_language,content.headers.accept_language>>|Value to send in the `Accept-Language` header.
|<<content.headers.custom,content.headers.custom>>|Custom headers for qutebrowser HTTP requests.
@@ -177,7 +179,6 @@
|<<content.user_stylesheets,content.user_stylesheets>>|List of user stylesheet filenames to use.
|<<content.webgl,content.webgl>>|Enable WebGL.
|<<content.webrtc_ip_handling_policy,content.webrtc_ip_handling_policy>>|Which interfaces to expose via WebRTC.
-|<<content.windowed_fullscreen,content.windowed_fullscreen>>|Limit fullscreen to the browser window (does not expand to fill the screen).
|<<content.xss_auditing,content.xss_auditing>>|Monitor load requests for cross-site scripting attempts.
|<<downloads.location.directory,downloads.location.directory>>|Directory to save downloads to.
|<<downloads.location.prompt,downloads.location.prompt>>|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: <<types,Int>>
+
+Default: +pass:[3000]+
+
+[[content.fullscreen.window]]
+=== content.fullscreen.window
+Limit fullscreen to the browser window (does not expand to fill the screen).
+
+Type: <<types,Bool>>
+
+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: <<types,Bool>>
-
-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)