fix bug:issue-50,crash when switch horizontal and vertical screen in desktop setting