Skip to content

Commit

Permalink
more reliably detection of X11 servers
Browse files Browse the repository at this point in the history
we can start one from a Wayland context, that does not mean that we don't need a UI context manager before accessing X11 resources
  • Loading branch information
totaam committed Jul 18, 2024
1 parent 1e242a0 commit 9d980f5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xpra/server/window/compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from collections.abc import Callable, Iterable, Sequence

from xpra.os_util import POSIX, OSX, gi_import
from xpra.util.system import is_Wayland
from xpra.util.objects import typedict
from xpra.util.str_fn import csv, repr_ellipsized, decode_str
from xpra.util.env import envint, envbool, first_time
Expand Down Expand Up @@ -128,7 +127,7 @@ def get_env_encodings(etype: str, valid_options: Iterable[str] = ()) -> Sequence
)

ui_context: ContextManager = nullcontext()
if POSIX and not OSX and not is_Wayland() and not envbool("XPRA_NOX11", False):
if POSIX and not OSX and not envbool("XPRA_NOX11", False) and os.environ.get("GDK_BACKEND", "x11") == "x11":
from xpra.gtk.error import xlog
ui_context = xlog

Expand Down

0 comments on commit 9d980f5

Please sign in to comment.