mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Fix broken window decorations on unpackaged GNOME instances (#3858)
* Fix broken window decorations on unpackaged GNOME instances * Fix CONTRIBUTORS detection * Fix CONTRIBUTORS
This commit is contained in:
parent
ffcc7612ab
commit
938c55ca01
2 changed files with 6 additions and 2 deletions
|
@ -248,6 +248,10 @@ is_mac = sys.platform.startswith("darwin")
|
|||
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", "")
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ from anki._backend import RustBackend
|
|||
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 *
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue