leanflutter / window_manager

This plugin allows Flutter desktop apps to resizing and repositioning the window.
https://pub.dev/packages/window_manager
MIT License
676 stars 177 forks source link

[Linux] Maximizing window erases minimum size constraint #422

Open holocronweaver opened 7 months ago

holocronweaver commented 7 months ago

On Linux (Ubuntu 22.04) if I set a minimum size, like:

WindowManager.instance.setMinimumSize(const Size(600, 600));

it is repsected until I maximize the window. If I then unmaximize the window it will ignore the minimum size and allow me to shrink it as small as I like.

I tried to work around this by listening for WindowUnmaximize and resetting the minimum size, but it had no effect:

@override
void onWindowUnmaximize() {
  WindowManager.instance.setMinimumSize(const Size(600, 600));
}

I am guessing something about maximizing the window is preventing window_manager from enforcing its constraints, but not sure how to resolve.

Thanks for this nifty package by the way, very useful!

jhmarryme commented 7 months ago

same