[Window Manager] Extract-method refactoring.