cli: add run-tagged subcommand
This commit is contained in:
parent
a1df575262
commit
3e7ca00565
7 changed files with 176 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ use {
|
|||
client::{CAP_JAY_COMPOSITOR, Client, ClientCaps, ClientError, ClientId},
|
||||
globals::{Global, GlobalName},
|
||||
ifs::{
|
||||
jay_acceptor_request::JayAcceptorRequest,
|
||||
jay_client_query::JayClientQuery,
|
||||
jay_color_management::JayColorManagement,
|
||||
jay_ei_session_builder::JayEiSessionBuilder,
|
||||
|
|
@ -515,6 +516,27 @@ impl JayCompositorRequestHandler for JayCompositor {
|
|||
self.client.add_client_obj(&obj)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn get_tagged_acceptor(
|
||||
&self,
|
||||
req: GetTaggedAcceptor<'_>,
|
||||
_slf: &Rc<Self>,
|
||||
) -> Result<(), Self::Error> {
|
||||
let obj = Rc::new(JayAcceptorRequest {
|
||||
id: req.id,
|
||||
client: self.client.clone(),
|
||||
tracker: Default::default(),
|
||||
version: self.version,
|
||||
});
|
||||
track!(self.client, obj);
|
||||
self.client.add_client_obj(&obj)?;
|
||||
let state = &self.client.state;
|
||||
match state.tagged_acceptors.get(state, req.tag) {
|
||||
Ok(d) => obj.send_done(&d),
|
||||
Err(e) => obj.send_failed(e),
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
object_base! {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue