mirror of
https://github.com/servo/servo.git
synced 2025-07-26 16:50:23 +01:00
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:
parent
bc52617d33
commit
64c5c3ee9d
2 changed files with 19 additions and 2 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue