google / flutter-desktop-embedding

Experimental plugins for Flutter for Desktop
Apache License 2.0
7.1k stars 607 forks source link

[window_size] Fix incorrect value for unconstrained maximum size. #847

Closed robert-ancell closed 3 years ago

robert-ancell commented 3 years ago

The previous code used (-1, -1), which means use the requistion size (the size that GTK has determined for the window) and resulted in windows that were unresizable.

Fixes https://github.com/google/flutter-desktop-embedding/issues/844

robert-ancell commented 3 years ago

Just updated it to do the same transform when requesting the size. We do have an interesting case if the size is (-1, -1) (i.e. requisition size) we can't expose that to the Dart side as Dart doesn't have that concept. Instead that will look like its unconstrained. This is probably only an issue if you have non-Dart code messing with the window size.