Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pending pipelines to Frame instantly #12928

Closed
wants to merge 7 commits into from

store pending state

Don't request title from pending pipeline
  • Loading branch information
cbrewster committed Sep 3, 2016
commit 4cbc56db0f97fcff5a97108518d14dd8e252774e
@@ -1617,7 +1617,13 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
fn handle_get_pipeline_title_msg(&mut self, pipeline_id: PipelineId) {
let result = match self.pipelines.get(&pipeline_id) {
None => return self.compositor_proxy.send(ToCompositorMsg::ChangePageTitle(pipeline_id, None)),
Some(pipeline) => pipeline.script_chan.send(ConstellationControlMsg::GetTitle(pipeline_id)),
Some(pipeline) => {
if !pipeline.is_pending {
pipeline.script_chan.send(ConstellationControlMsg::GetTitle(pipeline_id))
} else {
return warn!("Tried to get title for pending pipeline: {:?}", pipeline_id);
}
},
};
if let Err(e) = result {
self.handle_send_error(pipeline_id, e);
@@ -1832,6 +1838,9 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
is_current = true;
}
}
if let Some(pipeline) = self.pipelines.get_mut(&pipeline_id) {
pipeline.is_pending = false;
}
// If the pending pipeline is in the current state, this means that a traversal has not
// occurred and we should focus the new pipeline if needed, fire location change events,
// and update the frame tree.
@@ -75,6 +75,8 @@ pub struct Pipeline {
/// Frame that contains this Pipeline. Can be `None` if the pipeline is not apart of the
/// frame tree.
pub frame: Option<FrameId>,
/// Whether this pipeline has matured or not.
pub is_pending: bool,
}

/// Initial setup data needed to construct a pipeline.
@@ -298,6 +300,7 @@ impl Pipeline {
visible: visible,
is_private: is_private,
frame: None,
is_pending: true,
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.