add global events xb-repaint and xb-created