The implementation of the
'zwp_input_method_context_v1_delete_surrounding_text' function in
'qtwayland' interprets the first index parameter as the number of
characters to be deleted before the cursor and the second as the number
of characters to be deleted after the cursor.
In the current implementation of the keyboard, this means that if the
cursor is between two characters, both the character before the cursor
and the character after the cursor are deleted.
As only the character before the cursor is to be deleted, it is
sufficient to pass a '0' as the second parameter.
Deleting a character at the end of the preedit string now also
takes UTF-8 characters into account.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
If you pressed a key and then moved your finger to another position
without lifting it, the key remained visually pressed even after you
lifted your finger. Now the ID is stored for each touch event and as
soon as a release event returns, the corresponding key is put back into
the correct state.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
If the content type changes, then the layout also changes, which means
that the size must be adapted to the new layout and the widget must
be redrawn.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
It can happen that the input context is exited between a key press event
and a key release event, as a result it is set to NULL. If the
'keyboard_handle_key' function is called in this case, this leads to a
crash. To prevent this, the context is checked beforehand.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
Function added to be able to set the minimum allocation of the window.
Set the minimum allocation of the keyboard window manually.
Otherwise, the first call to 'window_schedule_resize' sets
'min_allocation' to the size of the current layout.
This means that a layout that requires less space no
longer has the chance to use the correct allocation size.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
Changed the numeric keys layout to create an easier to use numpad.
Adds Numpad floating point number input with checks that such a number
always has at max one decimal point.
Signed-off-by: Joscha.Wloch <Joscha.Wloch@bruker.com>
Allow configuring the look of the keyboard.
This patch does not make use of the colors.
Without configuration nothing should change to the old default look.
Signed-off-by: Torben Hohn <torben.hohn@bruker.com>
Allow empty space in the keyboard matrix by adding keytype_none.
This is effectively a NOP. Nothing happens when this key is pressed
and its not even drawn.
Signed-off-by: Torben Hohn <torben.hohn@bruker.com>
Prepare to make the keyboard layout more realistic by allowing
half width granularity with the keys.
Multiply all width realted values by 2 and divide key_width by 2.
This commit should not change the appearance of the keyboard.
Signed-off-by: Torben Hohn <torben.hohn@bruker.com>
We can use __VA_OPT__ to make a macro that automatically selects between
the puts and printf log scope variants.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The point of buffer_transform_split is to ensure that committing only
transform and scale changes gets reflected on screen, without explicit
damage. There is no need to go through the big set of parameter
combinations, it only needs to test that changing each triggers the
damage.
Test setting only scale and only transform separately, so that one
cannot mask bugs with the other.
This brings the screenshot count for buffer_transform_split from 12 down
to 2, which is good for CI running time.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This test was originally written to ensure Weston does not repaint too
much, but it does also test that renderers transform the damage
correctly into the framebuffer.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Continuing my quest to remove weston_view from backends and renderers,
drop gl-renderer's last use of weston_view.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The paint_node life cycle should match the output's, so we should be able
to store it in the state instead of a view.
This gets us closer to having the backends stop caring about views.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
We already validate the paint node list in weston_output_repaint,
immediately after we conditionally rebuild the z_order_list.
These asserts are thus completely redundant, as we've already
performed them in the front end.
My reason for removing this now is to drop weston_view usage
from the backend.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The paint node early update has already checked this value for us, we
should use that instead of interacting with the view.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Backends work on paint nodes, not views - and the paint node internal
name is a superset of the view internal name anyway, so it's not hard to
figure out which view a paint node belongs to when reading debug text.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
The failure reason is already part of the paint node, so passing the view
here just makes things a little bit more complicated.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Backends should be relying on paint nodes for their information, not
views.
Since we always have a paint node when we want to pass a buffer, we can
pass that instead of a view.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Now that ICC<->parametric image description interoperability is
implemented, and the stock sRGB profile is parametric, we can change the
default to what it should be.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
TF_SRGB will be deprecated, best to never advertise it. The test can
simply use gamma22 instead.
TF_EXT_LINEAR has an implementation and should be usable nowadays.
TF_ST2084_PQ, GAMMA22 and GAMMA28 likewise.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Weston does not support the saturation rendering intent for parametric
image descriptions yet. Not really, Weston would just do the same as
media-relative with BPC does.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This avoids ICC paths when no ICC profiles are explicitly used.
We can simplify the profile information sending and use the generic path
for the stock profile as well, no longer hard-coding the stock profile
in two places.
Since the stock profile creation cannot fail, we can streamline
cmlcms_init() a little, too.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
The icc<->parametric color transformation code uses "optical ICC
profiles" as part of the ICC pipeline. These profiles use a linear TRC
to encode the black point. When such TRC survives all optimizations, it
will cause the 3D LUT fallback path to be taken.
Detect such curve sets on the ICC pipeline optimizer, and convert them
to matrix stages. The matrix stages will then be optimized as usual,
often eliminating the stage completely.
The results can be seen in color-icc-output test after the stock sRGB
profile has been changed into a parametric one, causing all cases in the
test to hit the parametric-to-icc path. Some tests fail when they
suddenly start using the 3D LUT path which causes the errors to rise.
This patch fixes those (future) cases, and the errors remain the same as
before changing the stock profile.
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>