Sending key events through script task before processing them in the compositor.

Fixes #4163
This commit is contained in:
Nathan E. Egge 2014-12-12 10:19:04 -05:00
parent f451005f4f
commit b0552cb98e
10 changed files with 131 additions and 66 deletions

View file

@ -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.