2019-12-06 13:05:32 -05:00
|
|
|
wayland_test_client_installed_tests_libexecdir = join_paths(
|
|
|
|
mutter_installed_tests_libexecdir,
|
|
|
|
'wayland-test-clients',
|
|
|
|
)
|
|
|
|
|
|
|
|
test_driver_server_header = custom_target(
|
|
|
|
'test-driver server header',
|
|
|
|
input: 'test-driver.xml',
|
|
|
|
output: 'test-driver-server-protocol.h',
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'server-header',
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
test_driver_client_header = custom_target(
|
|
|
|
'test-driver client header',
|
|
|
|
input: 'test-driver.xml',
|
|
|
|
output: 'test-driver-client-protocol.h',
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'client-header',
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
test_driver_protocol_code = custom_target(
|
|
|
|
'test-driver source',
|
|
|
|
input: 'test-driver.xml',
|
|
|
|
output: 'test-driver-protocol.c',
|
|
|
|
command: [
|
|
|
|
wayland_scanner,
|
|
|
|
'private-code',
|
|
|
|
'@INPUT@', '@OUTPUT@',
|
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
common_sources = [
|
|
|
|
'wayland-test-client-utils.c',
|
|
|
|
'wayland-test-client-utils.h',
|
|
|
|
wayland_protocol_client_headers,
|
|
|
|
wayland_protocol_sources,
|
|
|
|
test_driver_client_header,
|
|
|
|
test_driver_protocol_code,
|
|
|
|
]
|
|
|
|
|
2020-11-10 16:08:36 -05:00
|
|
|
wayland_test_clients = [
|
|
|
|
'subsurface-remap-toplevel',
|
2021-08-06 12:17:18 -04:00
|
|
|
'subsurface-reparenting',
|
2021-09-07 04:35:27 -04:00
|
|
|
'subsurface-parent-unmapped',
|
2020-11-10 16:08:36 -05:00
|
|
|
'invalid-subsurfaces',
|
2020-11-11 04:49:25 -05:00
|
|
|
'invalid-xdg-shell-actions',
|
2021-06-18 17:51:39 -04:00
|
|
|
'xdg-apply-limits',
|
wayland/activation: Don't grab if no serial or surface was provided
A client can create a token without any seat, serial, or surface. In
this case, we'd still try to grab, which would run into some unforseen
code paths, potentially resulting in the following crash:
0) meta_wayland_tablet_seat_device_added (tablet_seat=0x55dff4271c90,
device=0x7f87b80655b0) at
../src/wayland/meta-wayland-tablet-seat.c:200
1) meta_wayland_tablet_seat_new (seat=0x0, manager=0x55dff3ec7b40) at
../src/wayland/meta-wayland-tablet-seat.c:283
2) meta_wayland_tablet_manager_ensure_seat (manager=manager@entry=0x55dff3ec7b40,
seat=seat@entry=0x0) at
../src/wayland/meta-wayland-tablet-manager.c:239
3) meta_wayland_tablet_manager_ensure_seat (seat=0x0, manager=0x55dff3ec7b40) at
../src/wayland/meta-wayland-touch.c:595
4) meta_wayland_seat_get_grab_info (seat=0x0, surface=0x55dff43ff5b0,
serial=0, require_pressed=0, x=0x0, y=0x0) at
../src/wayland/meta-wayland-seat.c:479
5) activation_activate (...) at
../src/wayland/meta-wayland-activation.c:261
Fix this by not trying to grab if not enough parameters was passed when
creating the token. Also add a test case that reproduces the above
crash.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2081>
2021-11-08 05:13:06 -05:00
|
|
|
'xdg-activation',
|
2021-12-17 18:15:56 -05:00
|
|
|
'xdg-toplevel-bounds',
|
2020-11-10 16:08:36 -05:00
|
|
|
]
|
2020-02-12 15:54:19 -05:00
|
|
|
|
2020-11-10 16:08:36 -05:00
|
|
|
foreach test : wayland_test_clients
|
|
|
|
executable(test,
|
|
|
|
sources: [
|
|
|
|
'@0@.c'.format(test),
|
|
|
|
common_sources,
|
|
|
|
],
|
2021-05-06 17:37:35 -04:00
|
|
|
include_directories: tests_includes,
|
2020-11-10 16:08:36 -05:00
|
|
|
c_args: tests_c_args,
|
|
|
|
dependencies: [
|
|
|
|
glib_dep,
|
2022-05-11 17:41:32 -04:00
|
|
|
gobject_dep,
|
2020-11-10 16:08:36 -05:00
|
|
|
wayland_client_dep,
|
|
|
|
],
|
|
|
|
install: have_installed_tests,
|
|
|
|
install_dir: wayland_test_client_installed_tests_libexecdir,
|
|
|
|
)
|
|
|
|
endforeach
|