Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macos with_disallow_hidpi #821

Closed
wants to merge 4 commits into from
Closed

Add macos with_disallow_hidpi #821

wants to merge 4 commits into from

Conversation

slmjkdbtl
Copy link
Contributor

@slmjkdbtl slmjkdbtl commented Mar 21, 2019

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created an example program if it would help users understand this functionality

Implemented by gentz and tested myself on macOS, mimicing sdl's SDL_WINDOW_ALLOW_HIGHDPI flag

@goddessfreya
Copy link
Contributor

r? @francesca64

@goddessfreya
Copy link
Contributor

@slmjkdbtl Can you resolve the merge conflict?

r? @mtak-

@goddessfreya
Copy link
Contributor

@Osspial can you just merge this? It's been a week.

@Osspial
Copy link
Contributor

Osspial commented Mar 28, 2019

Sorry it took so long to respond to this!

I'm not sure I'm comfortable with exposing another platform-specific DPI override just for macOS. We've already got an override for X11, and I don't want to keep adding platform-specific ways of controlling winit's DPI support until we have several subtly different and incompatible ways to set DPI.

There's talk going on in #796 about the HiDPI API, and I'd like to see that conclude before we decide whether or not to merge this.

@goddessfreya
Copy link
Contributor

@Osspial What's the verdict? I'd rather this gets merged.

@elinorbgr
Copy link
Contributor

Just to be sure I get a clear image, what would be the consequence of this flag precisely?

@goddessfreya
Copy link
Contributor

To quote the macos docs:

You can opt in to high resolution by calling the method setWantsBestResolutionOpenGLSurface: when you initialize the view, and supplying YES as an argument: [..] If you don’t opt in, the system magnifies the rendered results.

Basically, if you disable this flag, the window's size on the screen will stay the same, but it's contents will get magnified. This is unlike changing the dpi, which changes the window's size.

Maybe @slmjkdbtl can provide a screenshot?

@elinorbgr
Copy link
Contributor

Ok, so This is the same as what a non-hidpi wayland app would do, so such a flag would be trivial to replicate on Wayland, and I guess it would only make sense on these platforms.

@Osspial Osspial changed the base branch from master to winit-legacy June 13, 2019 05:30
@goddessfreya
Copy link
Contributor

@slmjkdbtl Could you quickly rebase this against the new master?

@Osspial
Copy link
Contributor

Osspial commented Jun 16, 2019

FWIW, I'm going to rescind my objections to this.

We could also implement this on Windows, but it would be an EventLoop-level flag, not a Window-level flag.

@goddessfreya goddessfreya changed the base branch from winit-legacy to master July 26, 2019 07:53
@goddessfreya goddessfreya changed the base branch from master to winit-legacy July 26, 2019 07:53
@goddessfreya
Copy link
Contributor

Hey, apologizes, but this PR has fallen greatly out of date. Could you rebase this against the new master and open a new PR. Anyways, I'm closing this one. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants