1
0
Fork 0
forked from wry/wry

portal: implement RemoteDesktop portal

This commit is contained in:
Julian Orth 2024-07-24 17:57:48 +02:00
parent 40e87f8f91
commit 665127e6c0
22 changed files with 994 additions and 35 deletions

View file

@ -4,6 +4,7 @@ use {
client::{Client, ClientCaps, ClientError, CAP_JAY_COMPOSITOR},
globals::{Global, GlobalName},
ifs::{
jay_ei_session_builder::JayEiSessionBuilder,
jay_idle::JayIdle,
jay_input::JayInput,
jay_log_file::JayLogFile,
@ -30,6 +31,8 @@ use {
thiserror::Error,
};
pub const CREATE_EI_SESSION_SINCE: Version = Version(5);
pub struct JayCompositorGlobal {
name: GlobalName,
}
@ -66,7 +69,7 @@ impl Global for JayCompositorGlobal {
}
fn version(&self) -> u32 {
4
5
}
fn required_caps(&self) -> ClientCaps {
@ -377,6 +380,19 @@ impl JayCompositorRequestHandler for JayCompositor {
seat.global.select_workspace(selector);
Ok(())
}
fn create_ei_session(&self, req: CreateEiSession, _slf: &Rc<Self>) -> Result<(), Self::Error> {
let obj = Rc::new(JayEiSessionBuilder {
id: req.id,
client: self.client.clone(),
tracker: Default::default(),
version: self.version,
app_id: Default::default(),
});
track!(self.client, obj);
self.client.add_client_obj(&obj)?;
Ok(())
}
}
object_base! {