textinput: use EventLoop.window instead of get_root_window(), this way, we are always ensured to get the root window. Maybe we could replace get_root_window as well in Widget. closes #981