From 9d980f569f746414af9eb8f975c2e2b32be3f94e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Thu, 18 Jul 2024 19:37:45 +0700 Subject: [PATCH] more reliably detection of X11 servers 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 --- xpra/server/window/compress.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xpra/server/window/compress.py b/xpra/server/window/compress.py index 678572390a..6a4ce5251d 100644 --- a/xpra/server/window/compress.py +++ b/xpra/server/window/compress.py @@ -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 @@ -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