private static void fixLinuxWaylandJava21focusIssue( Component owner ) {
		// only necessary on Linux when running in Java 21+
		if( owner == null || !SystemInfo.isLinux || SystemInfo.javaVersion < SystemInfo.toVersion( 21, 0, 0, 0 ) )
			return;

		// get window
		Window window = SwingUtilities.getWindowAncestor( owner );
		if( window == null )
			return;

		// remove window focus listener, which was added from class sun.awt.UNIXToolkit since Java 21
		for( WindowFocusListener l : window.getWindowFocusListeners() ) {
			if( "sun.awt.UNIXToolkit$1".equals( l.getClass().getName() ) ) {
				window.removeWindowFocusListener( l );
				break;
			}
		}
	}
On Linux with Wayland, since Java 21, Swing adds a window focus listener to popup owner/invoker window,
which hides the popup as soon as the owner/invoker window looses focus.
This works fine for light-weight popups.
It also works for heavy-weight popups if they do not request focus.
Because FlatLaf always uses heavy-weight popups, all popups that request focus
are broken since Java 21.

This method removes the problematic window focus listener.

https://bugs.openjdk.org/browse/JDK-8280993
https://github.com/openjdk/jdk/pull/13830
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatPopupFactory.java