save and restore window states including maximized, fullscreen, etc.

Signed-off-by: Takashiro <takashiro@qq.com>