aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2021-02-27 15:13:18 +0100
committerKenny Levinsen <kl@kl.wtf>2021-02-27 15:51:13 +0100
commit45bab8b258b1cb0ba68eff3bfc3913e1e5d84b7d (patch)
treeb5270751bd11f7a04154dc292b6c022a252924b3 /include
parentb1f7ec1c4d753d0135cb88347efbc11c7039b2cb (diff)
client: Replace pending_disable with state enum
This simplifies logic in seat handling.
Diffstat (limited to 'include')
-rw-r--r--include/client.h10
1 files changed, 9 insertions, 1 deletions
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;
};