Skip to content
This repository was archived by the owner on Dec 3, 2025. It is now read-only.

Conversation

@GeertJohan
Copy link
Contributor

This PR adds pixel_ratio calculations to the GLFW embedder.

Fixes #32
Replaces #187

@GeertJohan
Copy link
Contributor Author

This PR also includes capitalization of all callbacks, as discussed in #187 .

Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In giving this one last test I ran it on Linux via Chrome Remote Desktop, and discovered that it was broken if the monitor's size information isn't available (in which case the returned size is zero, per docs). I added handling of that case (and factored all that into a function since I think this comment got lost).

With that now fixed, it looks good!

@stuartmorgan-g stuartmorgan-g merged commit b2d8ec2 into google:master Jan 4, 2019
@GeertJohan GeertJohan deleted the feature/glfw-dpi branch January 4, 2019 21:55
@stuartmorgan-g
Copy link
Collaborator

It's probably worth considering whether the width/height passed to FlutterWindowCreate should be changed in a follow-up from being interpreted as screen coordinates to Flutter logical pixels, so that the physical window isn't so small on high-DPI monitors (without the embedder having to do all the same calculations). I'm not sure if there's a convention on Linux/Windows for default application window sizes to scale based on DPI.

@GeertJohan
Copy link
Contributor Author

Great! Thanks for all the feedback and helping in getting this solved.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[linux][windows] The pixel ratio is hardcoded to 1 which causes ugly rendering on high DPI displays.

2 participants