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

Allow setting minimum and maximum or fixed aspect ratio #584

Open
casey opened this issue Jul 2, 2018 · 2 comments
Open

Allow setting minimum and maximum or fixed aspect ratio #584

casey opened this issue Jul 2, 2018 · 2 comments

Comments

@casey
Copy link

casey commented Jul 2, 2018

I'm not sure if this can be done in a cross-platform way, but it would nice to be able to set the minimum and maximum aspect ratio, or specify a fixed aspect ratio that the window must maintain.

Specifically, I'm writing some games/pixel rendering demos that operate at a specific pixel resolution, and it would be able to lock the window to the aspect ratio of the output.

@francesca64 francesca64 added the S - enhancement Wouldn't this be the coolest? label Jul 2, 2018
@francesca64
Copy link
Member

Overall, it doesn't look hard.

However, I must caution you: if you plan on having proper X11 support (and covering the other platforms not listed here), you must still handle cases where the window isn't the desired aspect ratio. There's a very good chance that tiling WMs (i3/etc.) won't respect this hint, though I haven't tested that to know for sure. Here's how to address that when using gfx-rs.

@casey
Copy link
Author

casey commented Jul 2, 2018

I think that in addition to X11, macOS and windows will let you fullscreen a window with a locked aspect ratio, making it the size of the display and thus changing the aspect ratio.

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

No branches or pull requests

3 participants