Linux fix some bug.

fix that can not set window's min and max size on one time.
fix the restore of window to act correctly.
Allow frameless window to be resized.