-
Notifications
You must be signed in to change notification settings - Fork 943
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
wayland: rework scale factor handling #1538
Conversation
…er_size() returns new size
It seems like this it is this bug #1451 , right? I completely forgot about this issue in winit, thx. |
Indeed. Could have saved some time if this had gotten fixed right away. Can't see any reason why you'd want the old size :/ |
I don't see any, but it was opened as a followed up to some other bug, which was closed for some reason, and I forgot about this issue, since I never use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've memorized why it wasn't fixed right away, it's because you're not actually updating size, but just some variable, and your inner size will still be incorrect, so you're not fixing anything here. To fix it properly you should update size of the inner window, where this for each closure was invoked.
Okay, I'm not familiar with winit, already had a hard time enough trying to
figure out why the whole code is so complicated and what is the expected
behaviour across platforms, this works for me for now, so I'll let you take
someone else take over if there is a more proper fix to be figured out :).
…On Fri, Apr 17, 2020 at 1:27 PM Kirill Chibisov ***@***.***> wrote:
***@***.**** requested changes on this pull request.
I've memorized why it wasn't fixed right away, it's because you're not
actually updating size, but just some variable, and you inner size will
still be incorrect, so you're not fixing anything here. To fix it properly
you should update size of the inner window, where this for each closure was
invoked.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1538 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGGMFWQYLH26MYCX3V2WGLRNA4JDANCNFSM4MKUFTCQ>
.
|
I'm not sure what is working here, but on your PR I get missmatch when running
|
You are right, it doesn't. I must have messed up my setup and testing
a binary which still had the ScaleFactor handler by mistake ><
…On Fri, Apr 17, 2020 at 1:38 PM Kirill Chibisov ***@***.***> wrote:
I'm not sure what is working here, but on your PR I get missmatch when running glutin window example, so it's not a fix.
INNER SIZE PhysicalSize { width: 1278, height: 1280 }
PHysical size PhysicalSize { width: 1280, height: 1280 }
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine from me.
cc @vberger if it fixes your anvil issue.
Thanks! |
wayland: rework scale factor handling
Fixes some hidpi use cases on wayland :
apps usually resize their swap chains there and don't handle the explict scalefactorchanged.
As discussed with kchibisov, calling this on any scale change even if it happens to yield same physical size (e.g move window from 4K laptop to 4K TV), as a defense in depth to try to trigger any application UI/font scale redraw (even when they don't explicitly handle scalefactorchanged).
This might make applications do an identical swap chain resize as well if they don't check, but that's okay.
Fixes Iced