sony / flutter-embedded-linux

Embedded Linux embedding for Flutter
BSD 3-Clause "New" or "Revised" License
1.16k stars 122 forks source link

Wayland: Always respect XDG configure size regardless of state #321

Closed vially closed 1 year ago

vially commented 1 year ago

The previous logic was ignoring most of the toplevel configure events unless the window was maximized or was being resized. This pull-request removes that check in order to always respect the size suggested by the compositor.

This is particularly important for tiling compositors (e.g.: sway) where the window can be arbitrarily resized by the compositor even when it's not maximized (e.g.: when it's part of a tiled layout). The screen recordings below show some comparison videos of the old and new behavior.

Warning

Please review this carefully because it's not very clear what was the original purpose of the checks that are being removed in this pull-request. That being said, I have tested the new code in Sway, Weston, GNOME and Hyprland and it does seem to work as expected (as far as I can tell).

before.webm

after.webm

Note: I agree to delegate all rights related to this PR to Sony.