Skip to content

Fix macOS window sizes to follow convention - #359

Closed
trishume wants to merge 1 commit into
rust-windowing:masterfrom
trishume:fix-macos-hidpi
Closed

trishume wants to merge 1 commit into
rust-windowing:masterfrom
trishume:fix-macos-hidpi

Conversation

@trishume

@trishume trishume commented Dec 5, 2017

Copy link
Copy Markdown

In 4890229 the get_inner_size_pixels method was changed to assume that platform implementations return their sizes in physical pixels rather than points.

The Linux implementation was updated to reflect this but the macOS implementation was not, leading to the get_inner_size_pixels returning size in layout points and the get_inner_size_points method returning a size that doesn't correspond to anything.

This PR updates the macOS implementation to follow the convention.

I didn't update the window min and max size APIs, they are still in points, which I think is correct since the user of the library can't even know if they have to adjust their sizes until the window is created and they can check the hidpi factor. That's a problem with going all physical pixels I guess, you actually can't reasonably do so everywhere.

cc @kryptan @mitchmindtree @tomaka

@ebarnard

Copy link
Copy Markdown

@mitchmindtree

Copy link
Copy Markdown
Contributor

Thanks for working on this and for pinging me @trishume but unfortunately I won't have a mac to test on for a while again.

@jherman3

jherman3 commented Feb 20, 2018 •

Copy link
Copy Markdown

What needs to happen to move forward with this? I have a Mac to test on and am happy to contribute. I tested this with an OpenGL project I'm working on as well as all of the Glium examples in imgui-rs and this PR resolves the issue.

@mitchmindtree

Copy link
Copy Markdown
Contributor

It looks like this PR fixes an issue a lot of conrod+mac users are currently running into PistonDevelopers/conrod#1134.

@tomaka

tomaka commented Feb 26, 2018

Copy link
Copy Markdown
Contributor

Could you please add an entry in the CHANGELOG as well?

ThermalSpan pushed a commit to ThermalSpan/winit that referenced this pull request Mar 15, 2018
@sodiumjoe

Copy link
Copy Markdown
Contributor

seems like this can be closed in favor of #435

tmfink pushed a commit to tmfink/winit that referenced this pull request Jan 5, 2022
Various Outline things

Outline:
- `merge` combine two outlines
- `transformed` variant of `transform` that takes `self`
- `mirror_and_close` to mirror a Contour on the line between its first and last point
- `with_capacity'
- `len`
- `from_rect_rounded`

Contour:
 - `from_rect_rounded`: SVG style rect with rounded corners
 - `push_svg_arc`: SVG arc
madsmtm pushed a commit to madsmtm/winit that referenced this pull request Jun 11, 2022
…ing#259 (rust-windowing#359)

* docs: document wayland behavior for `Moved` event, closes rust-windowing#259

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

6 participants