frame: fix root window and fix cursorPosition