Update window and widget.
Fix compile errors.