also implemented onError in CClient which previously did not have any way to handle display disconnection.
files so this is only a checkpoint.