If there are more layers in one orientation than the other this can
cause wvkbd to overshoot the end of the layer list when switching
layers. It also means that switching layers after rotating will jump to
the next layer in the list, which is somewhat unexpected.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Since layer_surface_configure was changed to only call kbd_resize when
an output dimension changed, kbd_resize doesn't get called if the
keyboard was hidden and is being shown again, meaning it doesn't tell
the compositor about the scale.
This causes it to only output the top-right quarter of the keybaord
stretched to the entire window size after a SIGUSR1 + SIGUSR2 cycle with
the display scale set to 2.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Most displays are in landscape mode by default, so checking to see if
it's rotated will produce the exact opposite of the expected results.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Previously it was only possible to either show or hide the keyboard.
When you want to control the keyboard with a single button in, i.e.
a window manager, this requires a separate script to keep track of
state. This solves this by only needing one signal to toggle.
Since there are only 2 USR signals, I had to use real-time signals,
which are in the [POSIX
standard](https://standards.ieee.org/standard/1003_1b-1993.html) and
available in the [Linux kernel since
2.2](https://www.man7.org/linux/man-pages/man7/signal.7.html).
the use-case for this is simple 'swipe'-typing:
another program can take the output, guess the word which is being typed, and type the rest of the word