Create some channels on the constellation thread.

This commit is contained in:
Ms2ger 2016-06-08 16:27:57 +02:00
parent 0e776ffcf7
commit ec1ab223c2

View file

@ -308,6 +308,9 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
STF: ScriptThreadFactory<Message=Message>
{
pub fn start(state: InitialConstellationState) -> Sender<FromCompositorMsg> {
let (compositor_sender, compositor_receiver) = channel();
spawn_named("Constellation".to_owned(), move || {
let (ipc_script_sender, ipc_script_receiver) = ipc::channel().expect("ipc channel failure");
let script_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_script_receiver);
@ -317,9 +320,6 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
let (ipc_panic_sender, ipc_panic_receiver) = ipc::channel().expect("ipc channel failure");
let panic_receiver = ROUTER.route_ipc_receiver_to_new_mpsc_receiver(ipc_panic_receiver);
let (compositor_sender, compositor_receiver) = channel();
spawn_named("Constellation".to_owned(), move || {
let mut constellation: Constellation<Message, LTF, STF> = Constellation {
script_sender: ipc_script_sender,
layout_sender: ipc_layout_sender,