compositor-headless: do not create a seat
The headless backend was creating a seat, but nothing would ever happen on that seat, except the pointer cursor would show up. Tests do not seem to use this seat either. weston-test.so plugin creates its own seat to be controlled by the tests. This is part of the series to get rid of cursors for screenshot-based tests where they are not wanted. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
This commit is contained in:
parent
315bf8c5da
commit
a1046adc66
@ -176,25 +176,6 @@ headless_backend_create_output(struct headless_backend *b,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
headless_input_create(struct headless_backend *b)
|
|
||||||
{
|
|
||||||
weston_seat_init(&b->fake_seat, b->compositor, "default");
|
|
||||||
|
|
||||||
weston_seat_init_pointer(&b->fake_seat);
|
|
||||||
|
|
||||||
if (weston_seat_init_keyboard(&b->fake_seat, NULL) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
headless_input_destroy(struct headless_backend *b)
|
|
||||||
{
|
|
||||||
weston_seat_release(&b->fake_seat);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
headless_restore(struct weston_compositor *ec)
|
headless_restore(struct weston_compositor *ec)
|
||||||
{
|
{
|
||||||
@ -205,7 +186,6 @@ headless_destroy(struct weston_compositor *ec)
|
|||||||
{
|
{
|
||||||
struct headless_backend *b = (struct headless_backend *) ec->backend;
|
struct headless_backend *b = (struct headless_backend *) ec->backend;
|
||||||
|
|
||||||
headless_input_destroy(b);
|
|
||||||
weston_compositor_shutdown(ec);
|
weston_compositor_shutdown(ec);
|
||||||
|
|
||||||
free(b);
|
free(b);
|
||||||
@ -225,9 +205,6 @@ headless_backend_create(struct weston_compositor *compositor,
|
|||||||
if (weston_compositor_set_presentation_clock_software(compositor) < 0)
|
if (weston_compositor_set_presentation_clock_software(compositor) < 0)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
|
||||||
if (headless_input_create(b) < 0)
|
|
||||||
goto err_free;
|
|
||||||
|
|
||||||
b->base.destroy = headless_destroy;
|
b->base.destroy = headless_destroy;
|
||||||
b->base.restore = headless_restore;
|
b->base.restore = headless_restore;
|
||||||
|
|
||||||
@ -246,7 +223,6 @@ headless_backend_create(struct weston_compositor *compositor,
|
|||||||
|
|
||||||
err_input:
|
err_input:
|
||||||
weston_compositor_shutdown(compositor);
|
weston_compositor_shutdown(compositor);
|
||||||
headless_input_destroy(b);
|
|
||||||
err_free:
|
err_free:
|
||||||
free(b);
|
free(b);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user