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

Center Window on Windows #4876

Closed
Rigidity opened this issue May 31, 2022 · 3 comments
Closed

Center Window on Windows #4876

Rigidity opened this issue May 31, 2022 · 3 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system O-Windows Specific to the Windows desktop operating system

Comments

@Rigidity
Copy link

What problem does this solve or what need does it fill?

The window is not currently centered on Windows, but is on MacOS. This is inconsistent and can be pretty annoying.

What solution would you like?

The window to be centered by default, or for there to be a WindowDescriptor field and or Window method that centers the window. The position does not help here, since it can't be centered before the window is created and shown.

What alternative(s) have you considered?

I have tried setting the position in a startup system to get around this, based on the window size. This does work, but it is off-center for around a second which looks particularly bad.

I believe there is a way to do this in winit, but this is something that should be part of the Window API and not require using platform-specific code for.

@Rigidity Rigidity added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels May 31, 2022
@object71
Copy link
Contributor

Did you try adding WindowDescriptor before adding any bevy plugins? Specifically either the default plugins or the window plugins.

@alice-i-cecile alice-i-cecile added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in O-Windows Specific to the Windows desktop operating system O-MacOS Specific to the MacOS (Apple) desktop operating system and removed C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels May 31, 2022
@Rigidity
Copy link
Author

Yes, this is not the issue. The WindowDescriptor has no way to center windows.

@alice-i-cecile
Copy link
Member

Closed by #4999.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system O-Windows Specific to the Windows desktop operating system
Projects
None yet
Development

No branches or pull requests

3 participants