mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #21250 - paulrouget:fixkeys, r=jdm
Refactor winit key handling This should improve keys input on Linux and Windows. Should fix #17146 and fix #21161 Tested Mac, Windows and Linux. Basic typing works, combo work, text navigation works. I hit some strange issues where sometimes the text would be displayed late, but I believe it is unrelated to this PR. If we land that now, we will hit a regression on Mac, we need a winit update that includes https://github.com/tomaka/winit/pull/610. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21250) <!-- Reviewable:end -->
This commit is contained in:
commit
1bd34e7c55
4 changed files with 72 additions and 96 deletions
|
@ -367,10 +367,8 @@ impl<Window> Servo<Window> where Window: WindowMethods + 'static {
|
|||
|
||||
(EmbedderMsg::KeyEvent(ch, key, state, modified),
|
||||
ShutdownState::NotShuttingDown) => {
|
||||
if state == KeyState::Pressed {
|
||||
let event = (top_level_browsing_context, EmbedderMsg::KeyEvent(ch, key, state, modified));
|
||||
self.embedder_events.push(event);
|
||||
}
|
||||
let event = (top_level_browsing_context, EmbedderMsg::KeyEvent(ch, key, state, modified));
|
||||
self.embedder_events.push(event);
|
||||
},
|
||||
|
||||
(msg, ShutdownState::NotShuttingDown) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue