wl_keyboard: don't send key-up events for keys that are not logically down
This commit is contained in:
parent
abaeed4c01
commit
53c38bdd68
9 changed files with 68 additions and 27 deletions
|
|
@ -52,11 +52,14 @@ impl EiKeyboard {
|
|||
});
|
||||
}
|
||||
|
||||
pub fn send_key(&self, key: u32, state: u32) {
|
||||
pub fn send_key(&self, key: u32, state: KeyState) {
|
||||
self.client.event(ServerKey {
|
||||
self_id: self.id,
|
||||
key,
|
||||
state,
|
||||
state: match state {
|
||||
KeyState::Released => 0,
|
||||
KeyState::Pressed => 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ impl EiSeat {
|
|||
self: &Rc<Self>,
|
||||
time_usec: u64,
|
||||
key: u32,
|
||||
state: u32,
|
||||
state: KeyState,
|
||||
kb_state: &KeyboardState,
|
||||
) {
|
||||
if self.is_sender() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue