comparison mercurial/utils/procutil.py @ 46459:128a17d8436f stable

procutil: extend gui test to detect wayland session (issue6479)
author Yuya Nishihara <yuya@tcha.org>
date Thu, 04 Feb 2021 19:56:45 +0900
parents a04c03b0678e
children 65f437c240f2
comparison
equal deleted inserted replaced
46458:33dbc9f785e7 46459:128a17d8436f
544 return osutil.isgui() 544 return osutil.isgui()
545 else: 545 else:
546 # pure build; use a safe default 546 # pure build; use a safe default
547 return True 547 return True
548 else: 548 else:
549 return pycompat.iswindows or encoding.environ.get(b"DISPLAY") 549 return (
550 pycompat.iswindows
551 or encoding.environ.get(b"DISPLAY")
552 or encoding.environ.get(b"WAYLAND_DISPLAY")
553 )
550 554
551 555
552 def gui(): 556 def gui():
553 global _is_gui 557 global _is_gui
554 if _is_gui is None: 558 if _is_gui is None: