static void uninstall( JRootPane rootPane, Object data ) {
		if( !isSupported() )
			return;

		// remove listener
		if( data instanceof PropertyChangeListener )
			rootPane.removePropertyChangeListener( "ancestor", (PropertyChangeListener) data );

		// do not uninstall when switching to another FlatLaf theme and if still enabled
		if( UIManager.getLookAndFeel() instanceof FlatLaf && useWindowDecorations( rootPane ) )
			return;

		// uninstall native window border
		Container parent = rootPane.getParent();
		if( parent instanceof Window )
			uninstall( (Window) parent );
	}
Support for custom window decorations with native window border.

@author Karl Tauber
@since 1.1
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatNativeWindowBorder.java