Issues fixed by this change:
- Empty space above and below layouts.
- The compact shape, which is supposed to be used on small screens,
did not scale up until it reached the border of the screen, on some
screens, resulting in empty space next to it, and smaller buttons.
- The compact shape was used on some screens in horizontal orientation,
instead of the wide shape.
- The panel was rather small on large screens.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/677>
This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.
The second benefit is that it allows outputs to become part of new state management.
The manager is used for sizing the layer surface. It promises never to exceed half the output height.
The selection of the current layout is not being done here, leading to worse behaviour in 1:1 scaling.
In the future, it could be used for sizing the keyboard itself and the suggestion box, as well as decide which layout to use, because layouts should have some sizing hints.
Without handling transform, the surface was created with the wrong size on rotated displays, causing flicker before the .configure event arrived. With, it will attempt to set the right size from the start.