Skip to content

Respect scale when setting window position during creation.#2296

Merged
xStrom merged 1 commit intolinebender:masterfrom
xStrom:win-dpi
Dec 1, 2022
Merged

Respect scale when setting window position during creation.#2296
xStrom merged 1 commit intolinebender:masterfrom
xStrom:win-dpi

Conversation

@xStrom
Copy link
Member

@xStrom xStrom commented Dec 1, 2022

As pointed out in #2286 by @Steve-xmh our current Windows backend doesn't respect scale when setting the window position during creation. Indeed there was even a TODO note to that effect in the code.

This PR addresses that shortcoming. I also refactored some of that position/size scaling code to be more unified. Previously there were different rounding strategies used in different code paths for example. This can lead to really tricky to debug issues.

@xStrom xStrom added shell/win concerns the Windows backend S-needs-review waits for review labels Dec 1, 2022
Copy link
Member

@jneem jneem left a comment

Choose a reason for hiding this comment

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

This looks fine, but I don't know windows very well (which is why I never reviewed the last PR). Ideally a more windowsy person will also leave a review, but so as not to hold you up I'll give you the green button anyway...

@xStrom
Copy link
Member Author

xStrom commented Dec 1, 2022

I think in this case it's best to merge and see if someone who uses master will complain.

@xStrom xStrom merged commit ef936e0 into linebender:master Dec 1, 2022
@xStrom xStrom deleted the win-dpi branch December 1, 2022 18:36
@xStrom xStrom removed the S-needs-review waits for review label Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

port-to-glazier shell/win concerns the Windows backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants