mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fallback to Wayland if X11 is not available (#2433)
* Fallback to Wayland if X11 is not available * Avoid saying "support is disabled" when falling back to Wayland (dae)
This commit is contained in:
parent
f5eda9008f
commit
5afbf8934f
2 changed files with 12 additions and 5 deletions
|
@ -115,6 +115,7 @@ Tobias Predel <tobias.predel@gmail.com>
|
|||
Daniel Tang <danielzgtg.opensource@gmail.com>
|
||||
Jack Pearson <github.com/jrpear>
|
||||
yellowjello <github.com/yellowjello>
|
||||
Ingemar Berg <github.com/ingemarberg>
|
||||
|
||||
********************
|
||||
|
||||
|
|
|
@ -532,11 +532,17 @@ def _run(argv: Optional[list[str]] = None, exec: bool = True) -> Optional[AnkiAp
|
|||
and (os.getenv("QT_QPA_PLATFORM") == "wayland" or os.getenv("WAYLAND_DISPLAY"))
|
||||
and not os.getenv("ANKI_WAYLAND")
|
||||
):
|
||||
# users need to opt in to wayland support, given the issues it has
|
||||
print("Wayland support is disabled by default due to bugs:")
|
||||
print("https://github.com/ankitects/anki/issues/1767")
|
||||
print("You can force it on with an env var: ANKI_WAYLAND=1")
|
||||
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
||||
if not os.getenv("DISPLAY"):
|
||||
print(
|
||||
"Trying to use X11, but it is not available. Falling back to Wayland, which has some bugs:"
|
||||
)
|
||||
print("https://github.com/ankitects/anki/issues/1767")
|
||||
else:
|
||||
# users need to opt in to wayland support, given the issues it has
|
||||
print("Wayland support is disabled by default due to bugs:")
|
||||
print("https://github.com/ankitects/anki/issues/1767")
|
||||
print("You can force it on with an env var: ANKI_WAYLAND=1")
|
||||
os.environ["QT_QPA_PLATFORM"] = "xcb"
|
||||
|
||||
# profile manager
|
||||
i18n_setup = False
|
||||
|
|
Loading…
Reference in a new issue