1
0
Fork 0
forked from wry/wry

wl_surface: add jay_sync_file_surface extension

This commit is contained in:
Julian Orth 2026-02-19 20:32:54 +01:00
parent 8841865572
commit c5d983843e
13 changed files with 424 additions and 24 deletions

View file

@ -24,6 +24,7 @@ use {
jay_tree_query::JayTreeQuery,
jay_workspace_watcher::JayWorkspaceWatcher,
jay_xwayland::JayXwayland,
wl_surface::jay_sync_file_surface::JaySyncFileSurface,
},
leaks::Tracker,
object::{Object, Version},
@ -76,7 +77,7 @@ global_base!(JayCompositorGlobal, JayCompositor, JayCompositorError);
impl Global for JayCompositorGlobal {
fn version(&self) -> u32 {
25
26
}
fn required_caps(&self) -> ClientCaps {
@ -520,6 +521,18 @@ impl JayCompositorRequestHandler for JayCompositor {
}
Ok(())
}
fn get_sync_file_surface(
&self,
req: GetSyncFileSurface,
_slf: &Rc<Self>,
) -> Result<(), Self::Error> {
let surface = self.client.lookup(req.surface)?;
let obj = Rc::new(JaySyncFileSurface::new(req.id, self.version, &surface));
track!(self.client, obj);
self.client.add_client_obj(&obj)?;
Ok(())
}
}
object_base! {