Adding window dimensions parameters to window factory functions