compositing: Make the constellation messages serializable.

This commit is contained in:
Patrick Walton 2015-07-10 11:16:27 -07:00
parent a0cf597946
commit b6485a9eaf
32 changed files with 316 additions and 229 deletions

View file

@ -5,6 +5,7 @@
use msg::constellation_msg::ConstellationChan;
use msg::constellation_msg::Msg as ConstellationMsg;
use ipc_channel::ipc;
use std::borrow::ToOwned;
use std::sync::mpsc::channel;
@ -17,7 +18,7 @@ pub trait ClipboardProvider {
impl ClipboardProvider for ConstellationChan {
fn clipboard_contents(&mut self) -> String {
let (tx, rx) = channel();
let (tx, rx) = ipc::channel().unwrap();
self.0.send(ConstellationMsg::GetClipboardContents(tx)).unwrap();
rx.recv().unwrap()
}