mirror of
https://github.com/servo/servo.git
synced 2025-06-19 22:59:03 +01:00
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.
This commit is contained in:
parent
b9650b5dd5
commit
568d454ca6
12 changed files with 111 additions and 46 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue