seat_handle_capabilities may be called more than once with different caps.
In the current implementation, wl_{pointer,touch}_add_listener can be
called multiple times for the same seat, causing the buttons to be pressed
more than once in a single tap.
This commit implements seat_handle_capabilities correctly and
avoids setting duplicate handlers, and also handles the removal of capabilities.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This isn't a good way to solve this, and cause restrictions and
breakages.
We should find a better way to enforce text inside of keys, probably
using a second buffer to write into.
This is a bit hacky. The main problem is that there is no way to tell
cairo to limit the width. It will wrap text accordingly to width and
height, it will add ellipsizes if it overlow the box, but if a word
width is larger than the box width, it will write it.
To avoid that, I make sure we don't go too much to the left, and I
redraw the background at the right of the keys. This is not visible
cause we damage track correctly the updated buffer coordinates.
I also moved the damage tracking from do_rectangle and draw_text to
higher draw_key and draw_layout.
The virtual keyboard can't cover other surface. Only the wallpaper could
eventually go through it, or conky. Let's make a fancy default now that
--alpha exists for users that want the old transparency.
This strip everything that isn't the key we come for, Shift and Abc.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
most compose layouts are more minimalistic don't have space/backspace/enter anymore, pressing
a key will close the layout anyway. All layouts retain an Abc button
, even though tapping any non-key will close the layout just as well.
Some compose layouts have added modifiers (ctrl, alt, super) in the
bottom row
This is basically the same as the old 'full' layout, the new 'full'
layout removed some keys to reduce width. But on bigger devices like
tablets the old full layout was fine.
No need to have all layouts in the layers anymore, all layouts can be
accessed through Cmp + space / Cmp + layout switch button. Users are
encouraged to set `-l` and/or `--landscape-layers` to set their own
preference.
- The full layout now squashes less keys in a row, to accomplish this
the semicolon/colon, equal/plus and alt keys had to be sacrificed
from the full layout (they're on the special/symbols layout still).
- The half-keys in the simple layout are removed, giving a bit more
space.
- The default total keyboard height has been slightly enlarged (10px)
- The compose key moved down, it was too close to the 'a' (accidental
presses). The tab key moved to the top-right.
- The spacing between the buttons is slightly larger (aesthetic only)
- The key for layer switching is now labelled more consistently with an icon, and indicates direction of switching with an arrow
- An extra "index" layout was added that can be activated by pressing
Compose + the next/prev layout button. It has a key for each layout,
even those not specified at start. This special layout does not appear
in the normal layer cycling.
- The "Abc" key on secondary layers returns to the last alphabetical layout
- The compose layouts automatically hide when the user presses the space
where there are no keys, no need to explicitly press the "Abc" key.