From 568d454ca628181d41a29418d584489cbfc83c12 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Fri, 20 May 2016 16:28:50 -0600 Subject: 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. --- python/servo/build_commands.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python/servo/build_commands.py') 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) -- cgit v1.2.3