From 45bab8b258b1cb0ba68eff3bfc3913e1e5d84b7d Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sat, 27 Feb 2021 15:13:18 +0100 Subject: client: Replace pending_disable with state enum This simplifies logic in seat handling. --- include/client.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/client.h b/include/client.h index 3b1f105..8746bea 100644 --- a/include/client.h +++ b/include/client.h @@ -10,6 +10,14 @@ struct server; +enum client_state { + CLIENT_NEW, + CLIENT_ACTIVE, + CLIENT_PENDING_DISABLE, + CLIENT_DISABLED, + CLIENT_CLOSED +}; + struct client { struct linked_list link; // seat::clients struct server *server; @@ -22,7 +30,7 @@ struct client { struct seat *seat; int session; - bool pending_disable; + enum client_state state; struct linked_list devices; }; -- cgit v1.2.3