Fix event loop not waking up due to repeat source
Force the wake up from the repeat source as well.
Fixes: cad327755 (On Wayland, reduce amount of spurious wakeups)
This commit is contained in:
parent
5f7955cb2b
commit
e9ebf1e5f4
3 changed files with 8 additions and 1 deletions
|
|
@ -151,6 +151,9 @@ impl Dispatch<WlKeyboard, KeyboardData, WinitState> for WinitState {
|
|||
keyboard_state.repeat_token = keyboard_state
|
||||
.loop_handle
|
||||
.insert_source(timer, move |_, _, state| {
|
||||
// Required to handle the wakeups from the repeat sources.
|
||||
state.dispatched_events = true;
|
||||
|
||||
let data = wl_keyboard.data::<KeyboardData>().unwrap();
|
||||
let seat_state = state.seats.get_mut(&data.seat.id()).unwrap();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue