Moved X window capture to a separate thread and added a small message window.