Add setting.

This commit is contained in:
Florian Bruhin 2015-09-16 08:52:51 +02:00
parent 08e1d9a304
commit f83f4a6a1a
3 changed files with 19 additions and 1 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''
@ -630,6 +631,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,7 +418,8 @@ def _init_modules(args, crash_handler):
log.init.debug("Initializing completions...")
completionmodels.init()
log.init.debug("Misc initialization...")
os.environ['QT_WAYLAND_DISABLE_WINDOWDECORATION'] = '1'
if config.get('ui', 'hide-wayland-decoration'):
os.environ['QT_WAYLAND_DISABLE_WINDOWDECORATION'] = '1'
_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
)),