[PATCH STABLE] procutil: extend gui test to detect wayland session (issue6479)
Yuya Nishihara
yuya at tcha.org
Thu Feb 4 11:21:24 UTC 2021
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1612436205 -32400
# Thu Feb 04 19:56:45 2021 +0900
# Branch stable
# Node ID 6cc6b8610cec85dc624f4bb6568c2fd16ac018d1
# Parent 14feaa5792ed116ec8cc8469fc3de976fb4dd8f5
procutil: extend gui test to detect wayland session (issue6479)
diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py
--- a/mercurial/utils/procutil.py
+++ b/mercurial/utils/procutil.py
@@ -546,7 +546,11 @@ def _gui():
# pure build; use a safe default
return True
else:
- return pycompat.iswindows or encoding.environ.get(b"DISPLAY")
+ return (
+ pycompat.iswindows
+ or encoding.environ.get(b"DISPLAY")
+ or encoding.environ.get(b"WAYLAND_DISPLAY")
+ )
def gui():
More information about the Mercurial-devel
mailing list