Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pylib/anki/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ def call(argv: list[str], wait: bool = True, **kwargs: Any) -> int:
is_win = sys.platform.startswith("win32")
# also covers *BSD
is_lin = not is_mac and not is_win
is_gnome = (
"gnome" in os.getenv("XDG_CURRENT_DESKTOP", "").lower()
or "gnome" in os.getenv("DESKTOP_SESSION", "").lower()
)
dev_mode = os.getenv("ANKIDEV", "")
hmr_mode = os.getenv("HMR", "")

Expand Down
4 changes: 2 additions & 2 deletions qt/aqt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
from anki.buildinfo import version as _version
from anki.collection import Collection
from anki.consts import HELP_SITE
from anki.utils import checksum, is_lin, is_mac
from anki.utils import checksum, is_gnome, is_lin, is_mac
from aqt import gui_hooks
from aqt.log import setup_logging
from aqt.qt import *
Expand Down Expand Up @@ -614,7 +614,7 @@ def _run(argv: list[str] | None = None, exec: bool = True) -> AnkiApp | None:
)
wayland_forced = os.getenv("ANKI_WAYLAND")

if packaged and wayland_configured:
if (packaged or is_gnome) and wayland_configured:
if wayland_forced or not x11_available:
# Work around broken fractional scaling in Wayland
# https://bugreports.qt.io/browse/QTBUG-113574
Expand Down