try to fall back to xcb if wayland forced on packaged build
https://forums.ankiweb.net/t/anki-doesnt-start-under-wayland-linux/10409/5
This commit is contained in:
parent
595e23189b
commit
b9f8cdb8bc
@ -461,6 +461,14 @@ def _run(argv: Optional[List[str]] = None, exec: bool = True) -> Optional[AnkiAp
|
|||||||
profiler = cProfile.Profile()
|
profiler = cProfile.Profile()
|
||||||
profiler.enable()
|
profiler.enable()
|
||||||
|
|
||||||
|
if (
|
||||||
|
isWin
|
||||||
|
and getattr(sys, "frozen", False)
|
||||||
|
and os.getenv("QT_QPA_PLATFORM") == "wayland"
|
||||||
|
):
|
||||||
|
# the packaged builds currently do not support wayland natively
|
||||||
|
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
||||||
|
|
||||||
# default to specified/system language before getting user's preference so that we can localize some more strings
|
# default to specified/system language before getting user's preference so that we can localize some more strings
|
||||||
lang = anki.lang.get_def_lang(opts.lang)
|
lang = anki.lang.get_def_lang(opts.lang)
|
||||||
anki.lang.set_lang(lang[1])
|
anki.lang.set_lang(lang[1])
|
||||||
|
Loading…
Reference in New Issue
Block a user