added -R parameter to configure rounding
d4237205 — Amir Dahan a month ago
Add basic rounding

There's probably a better way of doing this, But this will do for now.

Added basic rounding to buttons.

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
fixed malfunctioning theme at random
8106d760 — mojyack a month ago
Check if popup surf configured on callbacks

In some situations, wl_touch_* events come between layer_surface_configure and xdg_popup_surface_configure.
It causes the keyboard to be drawn before the popup surf is configured, leading to "error 3: xdg_surface has never been configured".
This commit fixes this.
Re-open the keyboard on the same output it was

Even if the user is focusing another output while the geometry change.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Minimise visual glitches when starting

Most of the time, the first frame have to be rendered without knowing
which output is the current one. It means the first window could have
incorrect dimensions. This cause other program surface to shrink,
then grow back.

Let's try a smoother approach:

If we don't know the current output, we could check if one of them is
landscaped. If this is the case, we start landscaped to minimise the
visual glitch.

Also, the compositor might choose to not send any output geometry
information before the first surface role is assigned (sway master
829c75b9). Meaning after our initial set_size request. So we have to start
landscaped, and eventually flip to horizontal.

Thanks to the patch "Skip the first resize when landscaped while
starting", we do not draw multiple time on the buffer when we switch to vertical

This should cover most of the cases, and produce a more discrete

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
fix fractional scalled buffer missing one pixel

Before 1920*1080 scaled 1.40 was giving a buffer width of 1919 pixels.

The buffer dimensions have to be ceiled here, instead of rounded.

The rest of the dimensions have to stay the same, here 1371x120.

Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
event loop: exit if the wayland socket disappears

(prevents infinite loop when your compositor crashes)

Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
implemented a stub wl_surface_leave

This fixes "listener function for opcode 1 of wl_surface is NULL" error in wayfire 0.8.0

Ref: https://github.com/jjsullivan5196/wvkbd/issues/52
fixup: re-add flip_landscape() to wl_surface_enter (needed for landscape detection)
0e176800 — mojyack 6 months ago
do not refresh on wl_surface_enter

there is no need to do so, because this event is followed by layer_surface_configure.
sway-HEAD(020a572) complains "A configure is scheduled for an uninitialized xdg_surface",
but it works anyway.

fix #50
2d01b896 — mojyack 6 months ago
fix hyprland crashes when creating a surface multiple times
c457d697 — mojyack 6 months ago
optimize output iteration
5471e2ea — mojyack 6 months ago
resize keyboard only when entered to different output

the keyboard layout is saved even when hide/show (if output is same).
this is old behavior.
a1269454 — mojyack 6 months ago
handle screen resize and redraw in layer_surface_configure
aa9e8ab7 — mojyack 6 months ago
avoid using "wl_output" literal
d6439afc — Frank Oltmanns 6 months ago
Make font selection scheme specific

Add the members font and font_descriptor to struct clr_scheme, so that
it is possible to specify a font for each scheme.

During initialization create the font descriptors for each scheme.

Instead of initially setting the font descriptor when setting up the
buffer, set the font descriptor when drawing the text.

Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>