It doesn't seem too trivial to expect a complete solution here, but ... who knows :)
Some thoughts: start by enabling drag and drop tabs. When the user drags the tab βenoughβ away from its original location, you remove the tab from its beginning and create a new window (or some other user interface to show its drag and drop) containing the contents of the tab.
When the tab is discarded, create a new window (or use "drag and drop") and configure it as the user expects it.
source share