aboutsummaryrefslogtreecommitdiffstats
path: root/components/compositing/constellation.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/compositing/constellation.rs')
-rw-r--r--components/compositing/constellation.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/components/compositing/constellation.rs b/components/compositing/constellation.rs
index 22a22d459e7..34d20d42c0d 100644
--- a/components/compositing/constellation.rs
+++ b/components/compositing/constellation.rs
@@ -613,6 +613,19 @@ impl<LTF: LayoutTaskFactory, STF: ScriptTaskFactory> Constellation<LTF, STF> {
debug!("constellation got focus message");
self.handle_focus_msg(pipeline_id);
}
+ Request::Script(FromScriptMsg::ForwardMouseButtonEvent(
+ pipeline_id, event_type, button, point)) => {
+ if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
+ pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline_id,
+ CompositorEvent::MouseButtonEvent(event_type, button, point)));
+ }
+ }
+ Request::Script(FromScriptMsg::ForwardMouseMoveEvent(pipeline_id, point)) => {
+ if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
+ pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline_id,
+ CompositorEvent::MouseMoveEvent(Some(point))));
+ }
+ }
Request::Script(FromScriptMsg::GetClipboardContents(sender)) => {
let result = self.clipboard_ctx.as_ref().map_or(
"".to_owned(),