Makefile: accomodate cross-build pkg-config
Don't forget the obscure AltGr modifier key
Make all modifiers except capslock one shot and redraw keyboard when capslock pressed
added -R parameter to configure rounding
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
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
mode.
This should cover most of the cases, and produce a more discrete
start.
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>
fixup: re-add flip_landscape() to wl_surface_enter (needed for landscape detection)
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
fix hyprland crashes when creating a surface multiple times
optimize output iteration