Some broken clients (most notably Chromium and its descendants)
try to interpret keymaps as if they were input sequences coming
from evdev. Workaround that by only using codes that directly
produce characters.
Fixes#244
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/598>
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 workaround makes Squeekboard use the wide shape on more devices.
On many devices with wide screens, which should use the wide shape
for layouts while in horizontal orientation, the compact shape was
used instead.
In particular, 5" large displays with an aspect-ratio of 16:9,
which are relatively common, were using the compact shape.
This workaround has the side-effect of allowing for more empty space
above and below the wide shape, to fit the layout into the available area.
The buttons on displays where this would be noticeable,
should still be larger than before.
To find an appropriate point for switching between the shapes without
having the relevant displays to test with,
one can create an image sized according to the device's display-resolution
and pixel-density, place a line representing the height of Squeekboard
(based on the scaling-tests), paste images of compact and wide
layout-shapes into the area and scale them appropriately,
set the image-viewer to show the image according to physical size,
and then compare which one fits better.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/639>
These are based on actual displays/devices.
A display-size-calculator ( https://www.sven.de/dpi/ ) was used to
calculate the width and height from resolution and diagonal display-size.
Some of these tests check for non-optimal results;
however, their purpose is mostly to make it noticeable
how changes to scaling-behaviour affect various
display-types.
When Squeekboard's scaling-behaviour will be improved, the tests
should be updated with values that fit the displays/devices better.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/640>
Remove Fragile from the list of dependencies
It is not necessary for building 'gio' anymore,
since the upgrade to 'glib v2_58'.
Remove "online" and "reset_lock" Meson-options
Building Squeekboard should work offline.
Use a single "Cargo.toml"-file instead of splitting it into parts
and putting it back together when building.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/623>
`gtk::Settings::property()` no longer returns a `Result` but instead
panics if the property doesn't exist. In order to work around this
change without affecting the surrounding code too much, this patch
modifies the `prop` function so we can avoid panics and wrap the
property value into a `Result` as was previously the case.
Part-of: <https://gitlab.gnome.org/World/Phosh/squeekboard/-/merge_requests/620>