#Is it possible to disable window maximization?

1 messages ยท Page 1 of 1 (latest)

small pond
#

In my game I have resizing disabled, however I noticed that (at least in 0.10.1) I can still maximize the window (Windows native app) which jumbles up everything ๐Ÿ˜„ Is it possible to disable this behavior?

#

Relevant:

2yr old comment in the Bevy windowing code stating that winit doesn't yet expose this functionality:
https://github.com/bevyengine/bevy/blob/a1feab939abf8f4c174577aa19fc48cff7ee8dd0/crates/bevy_window/src/window.rs#L338

The functionality implemented in 0.28.6 winit which bevy main should be using now:
https://github.com/rust-windowing/winit/blob/v0.28.6/src/platform_impl/windows/window.rs#L271

Now I'm just wondering if this wasn't yet exposed through Bevy, or if it is and I somehow missed it.

acoustic moat
acoustic moat
#

But not sure you can deactivate only maximize

small pond
#

Yes I saw that but it removes the whole bar, which prevents minimization, closing and moving the window which of course is not desirable.

acoustic moat
#

Yeah :/

#

can you create an issue for this?

small pond
#

Of course

acoustic moat
#

(or a PR :D)

#

Maybe I'll try to implement it if no one takes it

#

no promises

small pond
#

Yea same

acoustic moat
#

@small pond Just checking since I didn't see an issue, maybe you're working on a PR idk, if you want I can write the issue myself ^^

small pond
#

Nah, I just didn't get to it yet, it was almost 2am yesterday ๐Ÿ˜„ I'll make one now

acoustic moat
#

Okay ^^

small pond
acoustic moat
#

thank you ๐Ÿ’œ

small pond
#

I have an almost ready PR, will submit it tonight probably

#

I went with exposing all three buttons in an 'enabled_buttons: EnabledButtons' field in Window

acoustic moat
#

You can ping me when submitting so I review it!

small pond
#

Dang, I just saw the 0.11.0 release, was hoping to slide into that ๐Ÿ˜„

small pond
acoustic moat
small pond
#

Yeah I just clone the fork