refactor input window position and resize