parent
c333003514
commit
1e7ab0cd25
2 changed files with 10 additions and 3 deletions
|
|
@ -59,6 +59,10 @@ crate = "android-activity"
|
|||
allow-globs = ["ci/*", "githooks/*"]
|
||||
crate = "zerocopy"
|
||||
|
||||
[[bans.build.bypass]]
|
||||
allow-globs = ["cherry-pick-stable.sh"]
|
||||
crate = "libc"
|
||||
|
||||
[[bans.build.bypass]]
|
||||
allow-globs = ["freetype2/*"]
|
||||
crate = "freetype-sys"
|
||||
|
|
|
|||
|
|
@ -129,20 +129,23 @@ impl Dispatch<WlKeyboard, KeyboardData, WinitState> for WinitState {
|
|||
state.events_sink.push_window_event(WindowEvent::Focused(false), window_id);
|
||||
}
|
||||
},
|
||||
WlKeyboardEvent::Key { key, state: WEnum::Value(WlKeyState::Pressed), .. } => {
|
||||
WlKeyboardEvent::Key { key, state: WEnum::Value(key_state), .. }
|
||||
if matches!(key_state, WlKeyState::Repeated | WlKeyState::Pressed) =>
|
||||
{
|
||||
let key = key + 8;
|
||||
|
||||
key_input(
|
||||
keyboard_state,
|
||||
&mut state.events_sink,
|
||||
data,
|
||||
key,
|
||||
ElementState::Pressed,
|
||||
false,
|
||||
key_state == WlKeyState::Repeated,
|
||||
);
|
||||
|
||||
let delay = match keyboard_state.repeat_info {
|
||||
RepeatInfo::Repeat { delay, .. } => delay,
|
||||
// When compositor handles repeat, and thus we have `repeat = true`, we have
|
||||
// repeat on our side disabled, if it's not true, it's a compositor bug.
|
||||
RepeatInfo::Disable => return,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue