keyboard: send keymap without actions/behaviors to xwayland
This commit is contained in:
parent
541a7b5ebc
commit
abaeed4c01
10 changed files with 52 additions and 34 deletions
|
|
@ -27,7 +27,7 @@ impl ZwpInputMethodKeyboardGrabV2 {
|
|||
}
|
||||
|
||||
fn send_keymap(&self, kb_state: &KeyboardState) {
|
||||
let map = match kb_state.create_new_keymap_fd() {
|
||||
let map = match kb_state.map.create_unprotected_fd() {
|
||||
Ok(m) => m,
|
||||
Err(e) => {
|
||||
log::error!("Could not create new keymap fd: {}", ErrorFmt(e));
|
||||
|
|
@ -37,8 +37,8 @@ impl ZwpInputMethodKeyboardGrabV2 {
|
|||
self.client.event(Keymap {
|
||||
self_id: self.id,
|
||||
format: wl_keyboard::XKB_V1,
|
||||
fd: map,
|
||||
size: kb_state.map_len as _,
|
||||
fd: map.map,
|
||||
size: map.len as _,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ impl WlKeyboard {
|
|||
self.seat.client.event(Keymap {
|
||||
self_id: self.id,
|
||||
format: XKB_V1,
|
||||
fd,
|
||||
size: state.map_len as _,
|
||||
fd: fd.map,
|
||||
size: fd.len as _,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ impl ZwpVirtualKeyboardManagerV1RequestHandler for ZwpVirtualKeyboardManagerV1 {
|
|||
kb_state: Rc::new(RefCell::new(KeyboardState {
|
||||
id: self.client.state.keyboard_state_ids.next(),
|
||||
map: seat_keymap.map.clone(),
|
||||
map_len: seat_keymap.map_len,
|
||||
xwayland_map: seat_keymap.xwayland_map.clone(),
|
||||
pressed_keys: Default::default(),
|
||||
mods: Default::default(),
|
||||
})),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ impl ZwpVirtualKeyboardV1RequestHandler for ZwpVirtualKeyboardV1 {
|
|||
*self.kb_state.borrow_mut() = KeyboardState {
|
||||
id: self.client.state.keyboard_state_ids.next(),
|
||||
map: map.map.clone(),
|
||||
map_len: map.map_len,
|
||||
xwayland_map: map.xwayland_map.clone(),
|
||||
pressed_keys: Default::default(),
|
||||
mods: Default::default(),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue