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

Add an option to disable the maximize window button on PCs #9082

Closed
aleksa2808 opened this issue Jul 9, 2023 · 0 comments
Closed

Add an option to disable the maximize window button on PCs #9082

aleksa2808 opened this issue Jul 9, 2023 · 0 comments
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Feature A new feature, making something new possible

Comments

@aleksa2808
Copy link
Contributor

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

In my game I disabled resizing, however I can still maximize the window which displaces everything. I would like to be able to disable the maximize window button.

What solution would you like?

Probably to have one more member in the Window structure where you can say maximizable: false.

What alternative(s) have you considered?

I tried turning off the decorations option, but that removes the whole top bar from the window which prevents minimization, closing and moving the window as well, which is not desirable.

Additional context

2 year old comment still present in bevy 0.10.1 which states that this feature is still not exposed by winit
https://github.com/bevyengine/bevy/blob/v0.10.1/crates/bevy_window/src/window.rs#L294

winit 0.28.6 (the version that the latest bevy should be using) implementation of this feature
https://github.com/rust-windowing/winit/blob/v0.28.6/src/platform_impl/windows/window.rs#L271

@aleksa2808 aleksa2808 added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Jul 9, 2023
@Selene-Amanita Selene-Amanita added A-Windowing Platform-agnostic interface layer to run your app in and removed S-Needs-Triage This issue needs to be labelled labels Jul 9, 2023
github-merge-queue bot pushed a commit that referenced this issue Jul 23, 2023
# Objective

Implements #9082 but with an option to toggle minimize and close buttons
too.

## Solution

- Added an `enabled_buttons` member to the `Window` struct through which
users can enable or disable specific window control buttons.

---

## Changelog

- Added an `enabled_buttons` member to the `Window` struct through which
users can enable or disable specific window control buttons.
- Added a new system to the `window_settings` example which demonstrates
the toggling functionality.

---

## Migration guide

- Added an `enabled_buttons` member to the `Window` struct through which
users can enable or disable specific window control buttons.
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-Feature A new feature, making something new possible
Projects
None yet
Development

No branches or pull requests

3 participants