Simplified code for window movement.