diff --git a/CHANGELOG.md b/CHANGELOG.md index 0583bdd..e66d0da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ - `Multicache::has()` now correctly does what is expected of it - `xdg_shell` had an issue where it was possible that configured state gets overwritten before it was acked/committed. +- `wl_keyboard` rewind the `keymap` file before passing it to the client #### Backends diff --git a/src/wayland/seat/keyboard.rs b/src/wayland/seat/keyboard.rs index 7a8346d..e04de82 100644 --- a/src/wayland/seat/keyboard.rs +++ b/src/wayland/seat/keyboard.rs @@ -5,7 +5,7 @@ use std::{ cell::RefCell, default::Default, fmt, - io::{Error as IoError, Write}, + io::{Error as IoError, Seek, Write}, ops::Deref as _, os::unix::io::AsRawFd, rc::Rc, @@ -481,6 +481,7 @@ impl KeyboardHandle { let ret = tempfile().and_then(|mut f| { f.write_all(self.arc.keymap.as_bytes())?; f.flush()?; + f.rewind()?; kbd.keymap( KeymapFormat::XkbV1, f.as_raw_fd(),