Added ContainerInActiveWorkspace D-Bus cmd
@@ -118,4 +118,13 @@ dbus_interface! {
fn Debug() -> success: DBusResult<String> {
Ok(format!("{}", layout_cmd::tree_as_json()))
}
+
+ fn ContainerInActiveWorkspace(container_id: String) -> success: DBusResult<bool> {
+ let tree = try!(lock_tree_dbus());
+ let uuid = try!(try!(parse_uuid("container_id", &container_id))
+ .or_else(|| tree.active_id())
+ .ok_or(MethodErr::failed(&"No active container")));
+ tree.container_in_active_workspace(uuid)
+ .map_err(|err| MethodErr::failed(&format!("{:?}", err)))
+ }
}
