Simplify window layout logic