Skip to content
Snippets Groups Projects
Commit f8863113 authored by Marius Vlad's avatar Marius Vlad
Browse files

kiosk-shell: ignore additional seats


As kiosk-shell can't cope with multiple seat add a warning and avoid
creating any new seats. With it, this guards against potentially
receiving an invalid seat.

Signed-off-by: default avatarMarius Vlad <marius.vlad@collabora.com>
parent 79cf52e5
No related branches found
No related tags found
2 merge requests!905color-lcms: Introduction and implementation of LCMS plugin,!570kiosk-shell: Separate (keyboard) input focus from xdg-shell toplevel window activation
......@@ -57,9 +57,14 @@ get_kiosk_shell_seat(struct weston_seat *seat)
{
struct wl_listener *listener;
if (!seat)
return NULL;
listener = wl_signal_get(&seat->destroy_signal,
kiosk_shell_seat_handle_destroy);
assert(listener != NULL);
if (!listener)
return NULL;
return container_of(listener,
struct kiosk_shell_seat, seat_destroy_listener);
......@@ -443,6 +448,12 @@ kiosk_shell_seat_create(struct kiosk_shell *shell, struct weston_seat *seat)
{
struct kiosk_shell_seat *shseat;
if (wl_list_length(&shell->seat_list) > 0) {
weston_log("WARNING: multiple seats detected. kiosk-shell "
"can not handle multiple seats!\n");
return NULL;
}
shseat = zalloc(sizeof *shseat);
if (!shseat) {
weston_log("no memory to allocate shell seat\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment