gardesk/gardm / 0c6065d

Browse files

Add session_type field to StartSession IPC request

Add session_type field to distinguish X11 and Wayland sessions.
Uses serde default for backward compatibility with existing clients.
Authored by mfwolffe <wolffemf@dukes.jmu.edu>
SHA
0c6065d9fef9d3a985d23eb1b6208db725224023
Parents
62ef55b
Tree
70a32bc

1 changed file

StatusFile+-
M gardm-ipc/src/lib.rs 8 0
gardm-ipc/src/lib.rsmodified
@@ -10,6 +10,11 @@ use tokio::net::UnixStream;
1010
 /// Socket path for gardm IPC
1111
 pub const SOCKET_PATH: &str = "/run/gardm.sock";
1212
 
13
+/// Default session type for backward compatibility
14
+fn default_session_type() -> String {
15
+    "x11".to_string()
16
+}
17
+
1318
 /// Requests from greeter to daemon
1419
 #[derive(Debug, Clone, Serialize, Deserialize)]
1520
 #[serde(tag = "type", rename_all = "snake_case")]
@@ -24,6 +29,9 @@ pub enum Request {
2429
     StartSession {
2530
         /// Session command (e.g., ["gar-session.sh"])
2631
         cmd: Vec<String>,
32
+        /// Session type: "x11" or "wayland"
33
+        #[serde(default = "default_session_type")]
34
+        session_type: String,
2735
         /// Additional environment variables
2836
         #[serde(default)]
2937
         env: Vec<String>,