Only enable borderless browserhtml window on OSX.

Pass browserhtml path as relative path to avoid a mingw->windows path conversion
This commit is contained in:
Adam Casey 2016-05-04 14:37:51 +01:00 committed by UK992
parent bc52617d33
commit 64c5c3ee9d
2 changed files with 19 additions and 2 deletions

View file

@ -23,7 +23,7 @@ from mach.decorators import (
Command,
)
from servo.command_base import CommandBase, cd, call, check_call
from servo.command_base import CommandBase, cd, call, check_call, is_windows, is_macosx
def read_file(filename, if_exists=False):
@ -131,7 +131,15 @@ class PostBuildCommands(CommandBase):
if browserhtml_path is None:
print("Could not find browserhtml package; perhaps you haven't built Servo.")
return 1
args = args + ['-w', '-b',
if is_macosx():
# Enable borderless on OSX
args = args + ['-b']
elif is_windows():
# Convert to a relative path to avoid mingw -> Windows path conversions
browserhtml_path = path.relpath(browserhtml_path, os.getcwd())
args = args + ['-w',
'--pref', 'dom.mozbrowser.enabled',
'--pref', 'dom.forcetouch.enabled',
'--pref', 'shell.quit-on-escape.enabled=false',