mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Sending key events through script task before processing them in the compositor.
Fixes #4163
This commit is contained in:
parent
f451005f4f
commit
b0552cb98e
10 changed files with 131 additions and 66 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
use compositor_layer::{CompositorData, CompositorLayer, DoesntWantScrollEvents};
|
||||
use compositor_layer::{WantsScrollEvents};
|
||||
use compositor_task;
|
||||
use compositor_task::{ChangePageLoadData, ChangePageTitle, ChangePaintState, ChangeReadyState};
|
||||
use compositor_task::{CompositorEventListener, CompositorProxy, CompositorReceiver};
|
||||
use compositor_task::{CompositorTask, CreateOrUpdateDescendantLayer, CreateOrUpdateRootLayer};
|
||||
|
@ -336,6 +337,10 @@ impl<Window: WindowMethods> IOCompositor<Window> {
|
|||
}
|
||||
}
|
||||
|
||||
(compositor_task::KeyEvent(key, modified), NotShuttingDown) => {
|
||||
self.window.handle_key(key, modified);
|
||||
}
|
||||
|
||||
// When we are shutting_down, we need to avoid performing operations
|
||||
// such as Paint that may crash because we have begun tearing down
|
||||
// the rest of our resources.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue