wayland: fix an issue with key repeat potentially hanging/spinning
This commit is contained in:
1 parent
0473e1de78
commit
b4ded64e14
2 files changed
+15
-1
No files matched your search
@@ -17,6 +17,7 @@ brief notes about them may accumulate here.
|
||||
* Fixed an issue where the window would be redrawn on mouse move. This was most noticeable as a laggy mouse pointer when moving the mouse across a window running on the nouveau display driver on X11 and Wayland systems
|
||||
* Wayland: the raw key modifiers are now correctly propagated so that they activate when used with key assignments using the `key = "raw:123"` binding syntax.
|
||||
* Wayland: fixed window decoration and full screen handling [#224](https://github.com/wez/wezterm/issues/224)
|
||||
* Wayland: fixed an issue where key repeat processing could "run away" and hang the application
|
||||
|
||||
### 20210203-095643-70a364eb
|
||||
|
||||
|
||||
@@ -70,7 +70,20 @@ impl KeyboardDispatcher {
|
||||
loop_handle,
|
||||
&seat,
|
||||
None,
|
||||
RepeatKind::System,
|
||||
// We use a Fixed rate here because if we use
|
||||
// RepeatKind::System and/or a rate higher than the 25
|
||||
// repeats per second specified here, the repeat machinery
|
||||
// in the toolkit generates synthetic results faster than
|
||||
// can be kept up with. I think there might be a scheduling
|
||||
// issue with the calloop crate. The issue manifests as
|
||||
// the key generating LOTs more presses even after it has
|
||||
// been released.
|
||||
// Capping it to a reasonable (but subjectively not ideal)
|
||||
// value avoids the application effectively hanging.
|
||||
RepeatKind::Fixed {
|
||||
rate: 25,
|
||||
delay: 500,
|
||||
},
|
||||
move |evt: KbEvent, _, _| {
|
||||
inner.lock().unwrap().handle_event(evt);
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user