aboutsummaryrefslogtreecommitdiff
path: root/seatd/client.c
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-09-18 15:38:53 +0200
committerKenny Levinsen <kl@kl.wtf>2020-09-22 01:01:46 +0200
commit51c7467516d6213d1ff614e4db1e216de6367cc8 (patch)
tree9785f1209ab1c61ddaee0c77a11b6091f1cdc74c /seatd/client.c
parentd16122e98a1630d3ea96ff80dc3ea262660fd502 (diff)
seat: Rework seat activation/switch logic
The seat activation logic did not correctly handle VT switching and switching between multiple sessions. Session switching on VT-bound seats is now performed using a VT switch, taking advantage of VT signals to perform the actual switch. This simplifies switching logic and makes it more robust.
Diffstat (limited to 'seatd/client.c')
-rw-r--r--seatd/client.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/seatd/client.c b/seatd/client.c
index 31a3fd5..fcb238d 100644
--- a/seatd/client.c
+++ b/seatd/client.c
@@ -66,6 +66,7 @@ struct client *client_create(struct server *server, int client_fd) {
client->uid = uid;
client->gid = gid;
client->pid = pid;
+ client->session = -1;
client->server = server;
client->connection.fd = client_fd;
linked_list_init(&client->devices);
@@ -453,15 +454,3 @@ fail:
client_destroy(client);
return -1;
}
-
-int client_get_session(const struct client *client) {
- if (client->seat == NULL || client->seat->active_client != client) {
- return -1;
- }
- if (client->seat->vt_bound) {
- return client->seat_vt;
- }
- // TODO: Store some session sequence
- errno = ENOSYS;
- return -1;
-}