[Window] Consolidate tab show/hide code