1
0
Fork 0
forked from wry/wry

clientmem: store more information about mappings

This commit is contained in:
Julian Orth 2024-09-07 17:00:08 +02:00
parent 92f7cb56fd
commit 604974c927
6 changed files with 67 additions and 18 deletions

View file

@ -165,11 +165,11 @@ impl JayInput {
}
}
fn set_keymap_impl<F>(&self, keymap: &OwnedFd, len: u32, f: F) -> Result<(), JayInputError>
fn set_keymap_impl<F>(&self, keymap: &Rc<OwnedFd>, len: u32, f: F) -> Result<(), JayInputError>
where
F: FnOnce(&Rc<XkbKeymap>) -> Result<(), JayInputError>,
{
let cm = Rc::new(ClientMem::new(keymap.raw(), len as _, true)?).offset(0);
let cm = Rc::new(ClientMem::new(keymap, len as _, true, Some(&self.client))?).offset(0);
let mut map = vec![];
cm.read(&mut map)?;
self.or_error(|| {