macOS: disallow_highdpi will set explicity the value to avoid the SO value by default (#2339)
Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
401d20fa1f
commit
ac42447459
2 changed files with 6 additions and 0 deletions
|
|
@ -100,8 +100,13 @@ unsafe fn create_view(
|
|||
) -> Option<(IdRef, Weak<Mutex<CursorState>>)> {
|
||||
let (ns_view, cursor_state) = new_view(ns_window);
|
||||
ns_view.non_nil().map(|ns_view| {
|
||||
// The default value of `setWantsBestResolutionOpenGLSurface:` was `false` until
|
||||
// macos 10.14 and `true` after 10.15, we should set it to `YES` or `NO` to avoid
|
||||
// always the default system value in favour of the user's code
|
||||
if !pl_attribs.disallow_hidpi {
|
||||
ns_view.setWantsBestResolutionOpenGLSurface_(YES);
|
||||
} else {
|
||||
ns_view.setWantsBestResolutionOpenGLSurface_(NO);
|
||||
}
|
||||
|
||||
// On Mojave, views automatically become layer-backed shortly after being added to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue