Merge branch 'wayland-deco' of ssh://tonks/qutebrowser

This commit is contained in:
Florian Bruhin 2015-09-17 21:00:17 +02:00
commit d9bad853e7
3 changed files with 21 additions and 0 deletions

View File

@ -47,6 +47,7 @@
|<<ui-window-title-format,window-title-format>>|The format to use for the window title. The following placeholders are defined:
|<<ui-hide-mouse-cursor,hide-mouse-cursor>>|Whether to hide the mouse cursor.
|<<ui-modal-js-dialog,modal-js-dialog>>|Use standard JavaScript modal dialog for alert() and confirm()
|<<ui-hide-wayland-decoration,hide-wayland-decoration>>|Hide the window decoration when using wayland (requires restart)
|==============
.Quick reference for section ``network''
@ -631,6 +632,17 @@ Valid values:
Default: +pass:[false]+
[[ui-hide-wayland-decoration]]
=== hide-wayland-decoration
Hide the window decoration when using wayland (requires restart)
Valid values:
* +true+
* +false+
Default: +pass:[false]+
== network
Settings related to the network.

View File

@ -418,6 +418,10 @@ def _init_modules(args, crash_handler):
log.init.debug("Initializing completions...")
completionmodels.init()
log.init.debug("Misc initialization...")
if config.get('ui', 'hide-wayland-decoration'):
os.environ['QT_WAYLAND_DISABLE_WINDOWDECORATION'] = '1'
else:
os.environ.pop('QT_WAYLAND_DISABLE_WINDOWDECORATION', None)
_maybe_hide_mouse_cursor()
objreg.get('config').changed.connect(_maybe_hide_mouse_cursor)

View File

@ -318,6 +318,11 @@ def data(readonly=False):
SettingValue(typ.Bool(), 'false'),
"Use standard JavaScript modal dialog for alert() and confirm()"),
('hide-wayland-decoration',
SettingValue(typ.Bool(), 'false'),
"Hide the window decoration when using wayland "
"(requires restart)"),
readonly=readonly
)),