Linux: Disable the Wayland backend on GNOME

GNOME has no support for server side decorations.
Can be controlled by new option linux_display_server.
This commit is contained in:
Kovid Goyal
2019-06-04 19:10:13 +05:30
parent f1494b64e5
commit 277f43aed6
8 changed files with 60 additions and 21 deletions

View File

@@ -714,22 +714,25 @@ def create_opts(args, debug_config=False, accumulate_bad_lines=None):
from .config import load_config
config = tuple(resolve_config(SYSTEM_CONF, defconf, args.config))
if debug_config:
print(version(add_rev=True))
print(' '.join(os.uname()))
from io import StringIO
dbuf = StringIO()
print(version(add_rev=True), file=dbuf)
print(' '.join(os.uname()), file=dbuf)
if is_macos:
import subprocess
print(' '.join(subprocess.check_output(['sw_vers']).decode('utf-8').splitlines()).strip())
else:
print('Running under:', green('Wayland' if is_wayland else 'X11'))
print(' '.join(subprocess.check_output(['sw_vers']).decode('utf-8').splitlines()).strip(), file=dbuf)
if os.path.exists('/etc/issue'):
print(open('/etc/issue', encoding='utf-8', errors='replace').read().strip())
print(open('/etc/issue', encoding='utf-8', errors='replace').read().strip(), file=dbuf)
if os.path.exists('/etc/lsb-release'):
print(open('/etc/lsb-release', encoding='utf-8', errors='replace').read().strip())
print(open('/etc/lsb-release', encoding='utf-8', errors='replace').read().strip(), file=dbuf)
config = tuple(x for x in config if os.path.exists(x))
if config:
print(green('Loaded config files:'), ', '.join(config))
print(green('Loaded config files:'), ', '.join(config), file=dbuf)
overrides = (a.replace('=', ' ', 1) for a in args.override or ())
opts = load_config(*config, overrides=overrides, accumulate_bad_lines=accumulate_bad_lines)
if debug_config:
if not is_macos:
print('Running under:', green('Wayland' if is_wayland(opts) else 'X11'), file=dbuf)
print(dbuf.getvalue())
compare_opts(opts)
return opts