fixed in-screen detection when rotated