The idea is this:
* The menu is displayed horizontally in the titlebar by default with this feature enabled.
* The user can toggle the menu at any time to hide it with the title bar application menu button.
* When the window becomes too thin to fit the menu in the titlebar, the menu will deactivate.
* When the window is too thin to fit the menu in the titlebar, the menu button functions like the current title bar application menu button with a vertical menu.
This mockup is using settings that I personally use such as Breeze Dark the titlebar button configuration and the left aligned window title, but those are not actually part of my idea.