mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12: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>
|
Daniel Tang <danielzgtg.opensource@gmail.com>
|
||||||
Jack Pearson <github.com/jrpear>
|
Jack Pearson <github.com/jrpear>
|
||||||
yellowjello <github.com/yellowjello>
|
yellowjello <github.com/yellowjello>
|
||||||
|
Ingemar Berg <github.com/ingemarberg>
|
||||||
|
|
||||||
********************
|
********************
|
||||||
|
|
||||||
|
|
|
@ -532,6 +532,12 @@ 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 (os.getenv("QT_QPA_PLATFORM") == "wayland" or os.getenv("WAYLAND_DISPLAY"))
|
||||||
and not os.getenv("ANKI_WAYLAND")
|
and not os.getenv("ANKI_WAYLAND")
|
||||||
):
|
):
|
||||||
|
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
|
# users need to opt in to wayland support, given the issues it has
|
||||||
print("Wayland support is disabled by default due to bugs:")
|
print("Wayland support is disabled by default due to bugs:")
|
||||||
print("https://github.com/ankitects/anki/issues/1767")
|
print("https://github.com/ankitects/anki/issues/1767")
|
||||||
|
|
Loading…
Reference in a new issue