Commit graph

22 commits

Author SHA1 Message Date
Marius Vlad
c6ae939221 input: Introduce weston_touch_event
Similar to "input: Introduce weston_key_event struct" this struct is for
touch events. With this we add the initialization helpers, pass the
weston_touch_event as a const and remove the timespec argument.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-19 00:21:52 +03:00
Marius Vlad
98f8a08896 input: Re-work weston_pointer_axis_event
Move to a const struct weston_pointer_axis_event, add the base_event
struct that contains the timespec and use the initialization functions.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-19 00:21:52 +03:00
Marius Vlad
539bb34df4 input: Introduce weston_pointer_button_event
Similar to "input: Introduce weston_key_event struct", this adds a way
to store all required information with a common struct event to be able
to pass it down and to allow also pass additonal information like
Perfetto's flow IDs.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-19 00:21:52 +03:00
Marius Vlad
f9c1a4bf5d input: Re-work weston_pointer_motion_event
This adapts weston_pointer_motion_event struct to align in with
weston_key_event and includes the following changes:

- include base struct
- remove the const struct timespec from calls and use the base struct
- pass by a const pointer motion event in all the callers
- add init helper

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-19 00:21:52 +03:00
Marius Vlad
99527e6b92 input: Introduce weston_key_event struct
Rather than passing a time stamp, key, key state and key event state
use a weston_key_event struct to pass by all that using it.

This would allow in further patches to attach additional information
like a flow id used by Perfetto debug annotations for input events.

This patch has no functional change as it is now.

All the callees will just will extract the required information out of
struct weston_key_event.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-05-13 21:38:55 +03:00
Daniel Stone
ccefe3ef45 tests: Don't leak test idle source on full-skip
If the compositor fails to initialise in such a way that we want to
skip, don't leak the idle source.

This fixes the ASan failure, but still results in a TAP-parsing failure.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2026-04-09 00:20:11 +01:00
Derek Foreman
29b740ffee fullscreen-shell: Remove fullscreen-shell
It was deprecated, and now it is gone.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2026-03-16 16:00:20 +02:00
liupeng
4f963b68e0 tests: add newline to test-harness-plugin description
Signed-off-by: liupeng <liupeng01@kylinos.cn>
2026-03-06 14:07:18 +02:00
Leandro Ribeiro
becbd36b61 tests: ensure image description done event received
We may break out of the loop if wl_display_dispatch(client->wl_display)
fails and returns -1. So we need to assert that info->done is true after
the loop.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2026-03-05 13:17:25 +02:00
Pekka Paalanen
63e27f3af5 tests: use new label in test plugin
Part of migration away from get_label().

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-04 07:28:49 +00:00
Marius Vlad
128a88d1a8 shell-utils: Add labels for curtain created surfaces
struct weston_curtain_params is changed to match the new
weston_surface_set_label() API. For now, I did not bother hooking up the
static label flavor.

Part of migration away from get_label().

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-04 07:28:49 +00:00
Pekka Paalanen
bf513a362a libweston: add weston_color_gamut_from_protocol()
Reduce 4 copies of a piece of code into one. Usable for both client and
server side.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-03 07:41:27 +00:00
Pekka Paalanen
18f6592c83 tests: rewrite more color-manager handling into client library
Enhancing the color-manager machinery in the client library to suffice
for color-management-test.c as well, we can remove a copy of the
boilerplate code.

The changes include renaming things, moving parameters from
image_description to image_description_info, deleting the list of image
descriptions and cleaning them up explicitly, and creating the
color-management surface and output objects on-demand.

image_description_get_information() explicitly waits for the done event
instead of relying on a ropund-trip.

Bit operations got helper functions. Gamut parameter printing was
re-written.

In spite of the massive changes, the tests themselves still work exactly
the same.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-03 07:41:27 +00:00
Pekka Paalanen
7cf39e41ff tests: move color-manager handling to client library
There are two partial implementations of the color-manager
protocol boilerplate, in color-management-test.c and
color-management-parametric-test.c. This patch moves the implementation
from the latter into the client library, and uses the helper bit().

This paves way for moving the other partial implementation as well,
de-duplicating the overlapping code, and allowing new test programs to
poke at color-manager.

The color-manager is initialized on-demand, because mosts tests in the
suite do not need it. This avoids a little of unnecessary work.

In anticipation of wp_color_management_v1 version 2, the interface
version is explicit and ensured.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-03 07:41:27 +00:00
Pekka Paalanen
fb0cf120a6 tests: weston-test-assert needs is_pow2_64()
Make sure the definition is available.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
caf5a9b423 build: list generated headers as in weston-test-client-helper.h
weston-test-client-helper.h includes all these generated header files. I
could not figure out what might guarantee that these headers are
generated before compiling anything that includes
weston-test-client-helper.h, maybe we are simply lucky. I could not make
the build fail by building a single test program from a clean builddir.

Yet, this seems like the right thing to do.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
682c2a5859 build: libxwayland_test_client needs no weston_test_client_protocol_h
Would be strange if it did.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
1bd9b07985 tests: drop unused includes from xcb-client-helper
Just bumped into these when looking at dependencies.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
6c352da9fa tests: drop libweston-internal.h from assert
There does not seem to be any reason for this to be here.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
a044dfe1a6 build: move weston_test_client_protocol_h use
There is no need to special-case this generated header in foreach-tests
if we list it as an order-only dependency implied by dep_test_client.
The viewporter header is already there.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:55:53 +02:00
Pekka Paalanen
b55a0f9fcf build: use disabler for xwayland test
A minor simplification to tests/meson.build. The disabler object
prevents the test from being built or run.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:53:18 +02:00
Pekka Paalanen
859153bada tests: move the harness into subdir
It was getting difficult to see which files were part of the test
harness and which were actual tests. Moving the harness sources into a
subdirectory helps to see at a glance what is what, and will allow using
shorter file names in the future.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-02-23 13:53:18 +02:00