resize window size according to screen ratio
post events
use ToggleXGrab function