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

macOS High DPI monitor and autofit options #4194

Closed
sCreami opened this issue Feb 28, 2017 · 9 comments
Closed

macOS High DPI monitor and autofit options #4194

sCreami opened this issue Feb 28, 2017 · 9 comments
Labels

Comments

@sCreami
Copy link
Contributor

sCreami commented Feb 28, 2017

I thought the relative display size with retina displays was fixed but it seems not.

mpv version and platform

macOS 10.12 Sierra
git master

Expected behavior

When using a relative % as option, the window should have this % in height.

Actual behavior

Setting autofix=50% will result in a ±25% window.

[cc @Akemi as always]

@sCreami
Copy link
Contributor Author

sCreami commented Feb 28, 2017

Oh I forgot to mention but it's when using --no-hidpi-window-scale so maybe it's an expected behavior?

@Akemi Akemi added the os:mac label Feb 28, 2017
@Akemi
Copy link
Member

Akemi commented Feb 28, 2017

yeah i am kinda aware of this, though i thought it was the other way around. i just assumed it's like this but never tested. as a user it's unexpected. as a dev i don't know when autofit was set to a relative metric since i just get the final size in pixel.

maybe @wm4 knows of a way how i can get to know, in the vo backend, when a relative metric was set and i should force --hidpi-window-scale appropriately?

@ghost
Copy link

ghost commented Mar 1, 2017

vo_calc_window_geometry processes the option using the supplied arguments, that's all I know.

@Akemi
Copy link
Member

Akemi commented Mar 3, 2017

this commit should fix it (branch). since @wm4 added a dpi scale aware function to calculate the initial window position and size (a35a5bb), i could get rid of a fair amount of 'duplicate' code.

i tested the cases from #3867 again and they are also still working. maybe @SteveJobzniak wants to have a try too.

@sCreami
Copy link
Contributor Author

sCreami commented Mar 3, 2017

Works fine 👍

@ghost
Copy link

ghost commented Mar 3, 2017

@Akemi I have a non-Retina MacBook Pro 2010, so I guess that won't work for testing if this is a Retina-only patch.

@Akemi
Copy link
Member

Akemi commented Mar 3, 2017

both cases are affected by this change. i was just interested if the cases from #3867 still work for you.

@ghost
Copy link

ghost commented Mar 4, 2017

@Akemi Oh yeah that commit seems to change a lot. I'm building mpv with your new commit now to see if geometry still works.

@ghost
Copy link

ghost commented Mar 4, 2017

@Akemi All geometry test cases from the previous ticket work. I tested 0:0 (top left), 100%:100% (bottom right), 50%:50% (center), +20-20 (bottom left with negative offset). I tested with hidpi-window-scale=yes and =no. But no retina screen here so dunno if that did anything.

Well, your new patch works with non-retina displays! 👍 :)

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

No branches or pull requests

2 participants