src/vs/workbench/browser/parts/titlebar/menubarControl.ts/CustomMenubarControl/onDidChangeWindowFocus
class CustomMenubarControl:	protected override onDidChangeWindowFocus(hasFocus: boolean): void {
		if (!this.visible) {
			return;
		}

		super.onDidChangeWindowFocus(hasFocus);

		if (this.container) {
			if (hasFocus) {
				this.container.classList.remove('inactive');
			} else {
				this.container.classList.add('inactive');
				if (this.menubar) {
					this.menubar.blur();
				}
			}
		}
	}