Because the deskintl layout set is for desktop, laptop, and tablet devices with
a larger touchscreen. The default font size can be larger than the mobintl
layout set's default font size.
We created the config.deskintl.h based on config.mobintl.h, which is
for mobile devices. However, the current font "Sans 14" is a bit small in my
environment, Framework Laptop 12 (a 2-in-1 laptop with a 12.2-inch touchscreen).
Signed-off-by: Jun Aruga <jun.aruga@gmail.com>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is to update the README.md for layout-specific config.h
at the commit <49975e78ee437c6fb4a5f6ea3ccf8bc90dc65536>, and
deskintl layout set the commit <90ac0454cda3e376147c49abbb6b2fa0022211f0>.
Signed-off-by: Jun Aruga <jun.aruga@gmail.com>
for the mobile layout, we want shift+space to produce tab , which needed
to be implemented in the main code. For the desktop layout, we don't want
this though, a config parameter now handles this at compile time.
Ref: https://github.com/jjsullivan5196/wvkbd/pull/103
In a multi-monitor setup, the keyboard didn't appear correctly since
commit 9cc8931b46 . This affected only
landscape mode and only on multi-monitor setups where wvkbd is launched
on anything but the first output (and perhaps even only in
multi-monitor setups where one is portrait mode and one landscape like
mine, I'm not sure).
In the mentioned commit Willow commented:
> On situation where multiple screens are present, it will eventually need
> a second loop (roundtrip)
It seems that second loop never really made it all the way to drawing.
Adding an explicit drwsurf_attach() unconditionally in
layer_surface_configure fixes this.
I'm not sure if this is the best way but this fixes this bug, and as far
as I know doesn't cause extra redraws/resizes in the normal
single-monitor scenario.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Add a layout set aimed at desktop, laptop, and tablet devices with a larger
touchscreen. The layout is the US-International English, adding a compose key.
https://en.wikipedia.org/wiki/QWERTY#US-International
This layout set was created based on the layout set by the user nine7nine
(Jordan Johnston) <https://github.com/nine7nine>.
Note I copied the keymap.mobintl.h into the keymap.deskintl.h, and modified the
keymap.deskintl.h as follows to fix "<" (comma+shift), ">" (period+shift), "?"
(slash+shift) keys.
The following commit changed the key codes in the keymap.h for mobile. I
reverted the change for the keymap.deskintl.h.
9e4cf69137
Below is the difference between the keymap.mobintl.h and keymap.deskintl.h now.
```
$ diff -u keymap.mobintl.h keymap.deskintl.h
...
@@ -1226,9 +1225,9 @@
key <AB05> { [ b, B, equal ] };\
key <AB06> { [ n, N, question ] };\
key <AB07> { [ m, M, exclam ] };\
- key <AB08> { [ comma, apostrophe, less, U00AB] };\
- key <AB09> { [ period, question, greater, U00BB] };\
- key <AB10> { [ slash, greater ] };\
+ key <AB08> { [ comma, less, backslash] };\
+ key <AB09> { [ period, greater, bar ] };\
+ key <AB10> { [ slash, question ] };\
key <I147> { [ exclamdown, questiondown, exclamdown ] };\
key <RTSH> { [ Shift_R ] };\
key <KPMU> {\
...
```
Co-authored-by: Jordan Johnston <johnstonljordan@gmail.com>
Signed-off-by: Jun Aruga <jun.aruga@gmail.com>
* Rename config.def.h to config.mobintl.h.
* config.mobintl.h:
* Rename the macro config_def_h_INCLUDED to config_h_INCLUDED.
* Remove a tailing space as a refactoring.
* Makefile: Add config.h to the clean task.
Signed-off-by: Jun Aruga <jun.aruga@gmail.com>
Hyprland recently added a layerrule to allow certain layers to appear on the lockscreen,
but layers only identify themselves by the namespace.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
We have those fields on the drwbuf struct, but we always use the
same ones. Let's deduplicate those fields by moving them on the drwsurf.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
At the moment we flip the two buffers, and we backport the damaged
area on every frame callback. We completely ignore the compositor
sent event buffer->release. This event means that the compositor
finished reading the buffer pixels, and will never read them again. So
we can keep using the same buffer instead of fliping, if we receive the
event before asking for a new frame callback.
The change is not complicated, but we have to distinguish
drwsurf_attach, and drwsurf_flip. We try to flip before trying to
draw anything. And if the buffer has already been released, we don't
flip.
We also have to track the backport_damage separately than the buffer
current damage.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Until this point we was using one single buffer. This cause tearing when
they are scanned while we are drawing.
This refactorize our buffer and damage tracking to use two buffers. One
buffer, the back_buffer, is our dirty area. The other one, the
display_buffer, is left untouched.
Now we only flip buffers on adequate moments, indicated by the
compositor sending the frame callback event. We can draw multiple
time between those events, and we store all damaged areas. We only
schedule frame callbacks when needed, after storing a new damaged area.
Once flipped, we backport the damaged area from the new display_buffer
to the new back_buffer. Which generally means, for wvkbd, one rectangle
for each one of the surf and popup_surf.
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
wvkbd adapt its height, and layout depending on if the screen
is in landscape mode or not.
The only realiable way to know which outputs our surface is
rendered on is the wl_surface->enter(wl_output) event. But we receive
this event very late in the flow. After the first frame rendering, and
commit to the surface.
There already is some code to guess the best initial tentative, on the
most simple situations, to try to avoid an immediate re-creation of the
Wayland objects, buffer, and re-rendering of the layout.
But two issues was present:
First, we need a second roundtrip of the events, after the global
handle. This make the compositor to send the wl_outputs events earlier,
giving their geometry before our first show().
Then, the code that loop on them, if we don't already know the
current_output, was wrong. Because we changed the default state to
landscaped a while ago.
We also change how this code behave, we use the very first wl_output we
know about. Every behaviors are somehow wrong at this point, this one is
the simplest.
Now when starting wvkbd with only one screen, we don't need a second
loop anymore.
On situation where multiple screens are present, it will eventually need
a second one.
Signed-off-by: Willow Barraco <contact@willowbarraco.fr>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
Cairo is properly restored when not rounding, but in the codepath for
rounding it is not. Call cairo_restore() in both cases, otherwise
artefacts appear when using transparent fonts.
Signed-off-by: Frank Oltmanns <frank@oltmanns.dev>
Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
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>
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.
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>
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>
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>
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