Only set title if DISPLAY is set, change os x behavior to check DISPLAY.

This commit is contained in:
Michael Lazar
2016-07-15 16:22:54 -07:00
parent 131e64273a
commit 797ea5d072
3 changed files with 27 additions and 9 deletions

View File

@@ -99,7 +99,14 @@ class Terminal(object):
if self._display is None:
if sys.platform == 'darwin':
# OSX doesn't always set DISPLAY so we can't use this to check
display = True
# Note: Disabling for now, with the hope that if this
# is a widespread issue then people will complain and we can
# come up with a better solution. Checking for $DISPLAY is
# used extensively in mailcap files, so it really *should* be
# set properly. I don't have a mac anymore so I can't test.
# display = True
display = bool(os.environ.get("DISPLAY"))
else:
display = bool(os.environ.get("DISPLAY"))