Replace privileged field with a not_sandboxed() method
`privileged` now only indicates if a client is "sandboxed", i.e. it has a security context, where the sandbox engine isn't cosmic-panel. So replace the field with a method that's a bit more descriptive.
This commit is contained in:
parent
1bea97d42a
commit
f91115fb45
3 changed files with 28 additions and 19 deletions
|
|
@ -44,8 +44,6 @@ impl SecurityContextHandler for State {
|
|||
client_stream,
|
||||
Arc::new(ClientState {
|
||||
security_context: Some(security_context.clone()),
|
||||
privileged: security_context.sandbox_engine.as_deref()
|
||||
== Some("com.system76.CosmicPanel"),
|
||||
advertised_drm_node: drm_node,
|
||||
..new_state
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ impl XdgActivationHandler for State {
|
|||
})
|
||||
.and_then(|data| {
|
||||
data.downcast_ref::<ClientState>()
|
||||
.map(|data| data.privileged)
|
||||
.map(|data| data.not_sandboxed())
|
||||
})
|
||||
.unwrap_or(false)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue