mirror of
https://github.com/marcoallegretti/WEFT_OS.git
synced 2026-11-22 08:13:59 +00:00
The compositor stored appd's (pid, session) announcements and never used them, so no surface could be attributed to a session and any client could claim any app ID or the panel role. weft-appd now creates a connected socket pair for each session, gives the app shell one end as standard input with WAYLAND_SOCKET=0 and no WAYLAND_DISPLAY, and sends the other end to the compositor with the session and app ID over the compositor IPC socket (SCM_RIGHTS). The compositor inserts it as a client bound to that session: holding the connection is the session's identity. A session's zweft_shell windows carry its app ID, the panel and overlay roles are refused to sessions with a new role_not_permitted error, the session's first toplevel is reported to appd, an ended session's client is closed, and a client's disconnection is reported. The compositor accepts one appd connection at a time. The counter desktop check now requires the compositor to bind the app's client to its session and to close it when the session is terminated.
27 lines
768 B
TOML
27 lines
768 B
TOML
[package]
|
|
name = "weft-appd"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
|
|
[[bin]]
|
|
name = "weft-appd"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
anyhow = "1.0"
|
|
weft-ipc-types = { path = "../weft-ipc-types" }
|
|
toml = "0.8"
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "net", "io-util", "signal", "sync", "process", "time"] }
|
|
serde = { version = "1", features = ["derive"] }
|
|
rmp-serde = "1"
|
|
serde_json = "1"
|
|
tokio-tungstenite = "0.24"
|
|
futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
libc = "0.2"
|
|
rustix = { version = "1", features = ["net"] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
sd-notify = "0.4"
|