There are some hacks here in the form of an extra field "appears_locked_from", which can be used to hint that the user should see the button as locked. Without it, there's some confusion on user side regarding buttons that change states unprompted.
The `eek/layersurface.c` file should be excluded because it's an imported, "foreign" source, but clang-tidy doesn't seem to have an annotation for that.
An alternative would have been to exclude it in Meson and do the check there, but that requires clang-tidy, raising the barrier to contribute of Squeekboard even more (it already requires libfeedback, which isn't packaged widely).
Using the actual monitor width in pixels can lead to unsatisfying
results, depending on the display orientation and physical size: on a
10" tablet with a 1280x800 resolution (scale 1), portrait orientation
will be using the narrow layout.
If the keyboard is sized in an optimal way (i.e. so the layout fills the
whole area, with no blanks on the sides) this would result in an
unnecessarily huge keyboard being displayed, therefore wasting screen
estate.
Using the virtual display size gives a hint about the physical size of
the device, and can be used to select wide layouts even in portrait
mode, while still preserving current behavior on HiDPI devices.
This has been tested on PineTab, PinePhone and Librem 5.
Control and Alt are special in that they aren't expected to switch levels, and so don't need to change what characters are output.
Use in layouts by adding `modifier: Control` or `modifier: Alt` in place of `text: "foo"`.
The latching of the modifier will force the keyboard to emit raw key presses and prevent it from outputting text.
In order to do that, an additional piece of state (layout switcher) was exposed to the event handlers, a separation between squeekboard-only and system layouts was introduced, along with a Translation structure to prevent mixing up strings.
Sizes of widgets can be derived, so storing them was only for C compatibility. Similar with storing position inside of widgets.
Some layout margin and scaling changes could be introduced, meaning a possibility of visual differences.
Moved Cairo context usage to Rust, and rearranged ctx setup (position) to happen in one place.
Removed render calls that were overwritten on each draw call anyway.
Dedicated styling is now possible for themes which have a corresponding style-theme.css file. Adwaita:dark gets one, whereas other themes use the new generic fallback theme.