[PATCH weston v2 5/7] tests: Support setting the test client input dynamically

Pekka Paalanen ppaalanen at gmail.com
Tue Feb 13 11:49:52 UTC 2018

On Thu,  8 Feb 2018 15:37:56 +0200
Alexandros Frantzis <alexandros.frantzis at collabora.com> wrote:

> The current test client code waits for all wl_seat globals to arrive
> before checking them and deciding which one is the test seat global to
> use for the input object. Test code that needs to add/remove test seats
> would have to call the client_set_input() function for any seat changes
> to take effect. Although we could allow this by making
> client_set_input() public, we would be exposing unecessary
> implementation details.
> This commit applies any seat changes immediately upon arrival of the
> seat name, freeing test code from needing to call extra functions like
> client_set_input(). To achieve this the call to input_data_devices() is
> moved from client_set_input() to the seat name event handler.
> This commit also moves the check that all seats have names to an
> explicit test. To support this test, inputs corresponding to non-test
> seats are not destroyed (unless their seat global is removed), as
> was previously the case.
> Signed-off-by: Alexandros Frantzis <alexandros.frantzis at collabora.com>
> ---
> Changes in v2:
>  - Add explicit test for seat names.
>  - Don't destroy input objects for non-test seats unconditionally.
>  - Simplify devices handling in seat name handler.
>  tests/devices-test.c              | 10 ++++++++++
>  tests/weston-test-client-helper.c | 33 ++++++++++-----------------------
>  tests/weston-test-client-helper.h |  1 +
>  3 files changed, 21 insertions(+), 23 deletions(-)

Hi Alf,

well done! This is much more clear than the previous version, and easy
to review.

Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180213/7df2e088/attachment.sig>

More information about the wayland-devel mailing list