mutter/src/tests/wayland-test-clients/meson.build
Jonas Ådahl d2c798838e wayland/xdg-shell: Warn when invalid geometry is set
A client is not allowed to send an empty window geometry, and it is
specified that if it does so an error should be raised. Respect this
rule, ignore bogus geometries sent by clients with a warning.

Also add a soft assert that we don't try to "resend" a configuration
that was never sent, as doing so would result in SIGFPE as the geometry
scale is 0.

This fixes a SIGFPE crash occurring when a client did this.

Related: https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2808
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1527
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1557>
2020-12-03 21:39:13 +00:00

70 lines
1.5 KiB
Meson

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,
]
wayland_test_clients = [
'subsurface-remap-toplevel',
'invalid-subsurfaces',
'invalid-xdg-shell-actions',
]
foreach test : wayland_test_clients
executable(test,
sources: [
'@0@.c'.format(test),
common_sources,
],
include_directories: tests_includepath,
c_args: tests_c_args,
dependencies: [
glib_dep,
wayland_client_dep,
],
install: have_installed_tests,
install_dir: wayland_test_client_installed_tests_libexecdir,
)
endforeach