[PATCH weston 2/3] compositor-headless: do not create a seat

Pekka Paalanen ppaalanen at gmail.com
Thu Jun 16 10:36:16 UTC 2016


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

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 at collabora.co.uk>
---
 src/compositor-headless.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/src/compositor-headless.c b/src/compositor-headless.c
index 45e47ca..b78c321 100644
--- a/src/compositor-headless.c
+++ b/src/compositor-headless.c
@@ -176,25 +176,6 @@ headless_backend_create_output(struct headless_backend *b,
 	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
 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;
 
-	headless_input_destroy(b);
 	weston_compositor_shutdown(ec);
 
 	free(b);
@@ -225,9 +205,6 @@ headless_backend_create(struct weston_compositor *compositor,
 	if (weston_compositor_set_presentation_clock_software(compositor) < 0)
 		goto err_free;
 
-	if (headless_input_create(b) < 0)
-		goto err_free;
-
 	b->base.destroy = headless_destroy;
 	b->base.restore = headless_restore;
 
@@ -246,7 +223,6 @@ headless_backend_create(struct weston_compositor *compositor,
 
 err_input:
 	weston_compositor_shutdown(compositor);
-	headless_input_destroy(b);
 err_free:
 	free(b);
 	return NULL;
-- 
2.7.3



More information about the wayland-devel mailing list