aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/build_commands.py
diff options
context:
space:
mode:
authorJack Moffitt <jack@metajack.im>2016-05-20 16:28:50 -0600
committerJack Moffitt <jack@metajack.im>2016-05-20 23:40:39 -0600
commit568d454ca628181d41a29418d584489cbfc83c12 (patch)
tree230c2740bfed4efb04608bac45a8e93edd638129 /python/servo/build_commands.py
parentb9650b5dd5d8548e473218cd3f08c067a3ceb3c1 (diff)
downloadservo-568d454ca628181d41a29418d584489cbfc83c12.tar.gz
servo-568d454ca628181d41a29418d584489cbfc83c12.zip
Make Servo DPI aware on Windows
This implements system level DPI awareness for Windows. It has three parts: 1. Add a application manifest which is copied alongside servo.exe during build that declares our DPI awareness level. This is needed otherwise DPI queries will return 96dpi and our application will be upscaled on high DPI displays. 2. Rename hidpi_factor to avoid confusion with Glutin's hidpi_factor which does something else. 3. Correctly convert windows sizes on window creation for Windows. Unlike OS X, Windows uses device pixels for window creation.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r--python/servo/build_commands.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py
index 3dca0f3fae6..369918595ce 100644
--- a/python/servo/build_commands.py
+++ b/python/servo/build_commands.py
@@ -231,6 +231,10 @@ class MachCommands(CommandBase):
env=env, cwd=self.servo_crate(), verbose=verbose)
elapsed = time() - build_start
+ if sys.platform == "win32" or sys.platform == "msys":
+ shutil.copy(path.join(self.get_top_dir(), "components", "servo", "servo.exe.manifest"),
+ path.join(base_path, "debug" if dev else "release"))
+
# Generate Desktop Notification if elapsed-time > some threshold value
notify_build_done(elapsed)