Exemple #1
0
/**
 * Get the weston_output associated with the Weston compositor.
 * Currently, only one (1) output is supported by this plugin.
 **/
struct weston_output * Globals::output()
{
	struct wl_list *output_list;

	output_list = &compositor()->output_list;
	if (wl_list_length(output_list) != 1) {
		weston_log("weston-wfits: ERROR: single output support only!\n");
		assert(wl_list_length(output_list) == 1);
	}

	return container_of(output_list->next, struct weston_output, link);
}
Exemple #2
0
/**
 * Get the weston_seat associated with the Weston compositor.
 * Currently, only one (1) seat is supported by this plugin.
 **/
struct weston_seat * Globals::seat()
{
	struct wl_list *seat_list;
	struct weston_seat *seat;

	seat_list = &compositor()->seat_list;
	assert(wl_list_length(seat_list) == 1);
	seat = container_of(seat_list->next, struct weston_seat, link);

	return seat;
}
Exemple #3
0
static struct weston_seat*
get_seat(struct test_client *client)
{
	struct wl_list *seat_list;
	struct weston_seat *seat;

	seat_list = &client->compositor->seat_list;
	assert(wl_list_length(seat_list) == 1);
	seat = container_of(seat_list->next, struct weston_seat, link);

	return seat;
}