Make the window.hide_wayland_decoration option less special
This commit is contained in:
parent
4fdf2d6f40
commit
f52930c857
@ -50,6 +50,9 @@ Changed
|
||||
- The `importer.py` script was largely rewritten and now also supports importing
|
||||
from Firefox' `places.sqlite` file.
|
||||
- Various internal refactorings to use Python 3.5 and ECMAscript 6 features
|
||||
- If the `window.hide_wayland_decoration` setting is False, but
|
||||
`QT_WAYLAND_DISABLE_WINDOWDECORATION` is set in the environment,
|
||||
the decorations are still hidden.
|
||||
|
||||
Fixed
|
||||
~~~~~
|
||||
|
@ -91,8 +91,6 @@ def _init_envvars():
|
||||
|
||||
if config.val.window.hide_wayland_decoration:
|
||||
os.environ['QT_WAYLAND_DISABLE_WINDOWDECORATION'] = '1'
|
||||
else:
|
||||
os.environ.pop('QT_WAYLAND_DISABLE_WINDOWDECORATION', None)
|
||||
|
||||
if config.val.qt.highdpi:
|
||||
os.environ['QT_AUTO_SCREEN_SCALE_FACTOR'] = '1'
|
||||
|
@ -271,6 +271,8 @@ class TestEarlyInit:
|
||||
'QT_XCB_FORCE_SOFTWARE_OPENGL', '1'),
|
||||
('qt.force_platform', 'toaster', 'QT_QPA_PLATFORM', 'toaster'),
|
||||
('qt.highdpi', True, 'QT_AUTO_SCREEN_SCALE_FACTOR', '1'),
|
||||
('window.hide_wayland_decoration', True,
|
||||
'QT_WAYLAND_DISABLE_WINDOWDECORATION', '1')
|
||||
])
|
||||
def test_env_vars(self, monkeypatch, config_stub,
|
||||
config_opt, config_val, envvar, expected):
|
||||
@ -284,21 +286,6 @@ class TestEarlyInit:
|
||||
|
||||
assert os.environ[envvar] == expected
|
||||
|
||||
@pytest.mark.parametrize('old', ['1', '0', None])
|
||||
@pytest.mark.parametrize('configval', [True, False])
|
||||
def test_hide_wayland_decoration(self, monkeypatch, config_stub,
|
||||
old, configval):
|
||||
envvar = 'QT_WAYLAND_DISABLE_WINDOWDECORATION'
|
||||
if old is None:
|
||||
monkeypatch.delenv(envvar, raising=False)
|
||||
else:
|
||||
monkeypatch.setenv(envvar, old)
|
||||
|
||||
config_stub.val.window.hide_wayland_decoration = configval
|
||||
configinit._init_envvars()
|
||||
|
||||
assert os.environ.get(envvar) == ('1' if configval else None)
|
||||
|
||||
|
||||
@pytest.mark.parametrize('errors', [True, False])
|
||||
def test_late_init(init_patch, monkeypatch, fake_save_manager, args,
|
||||
|
Loading…
Reference in New Issue
Block a user