fixed touch and mouse positions and handle windows resize event