Alt+Tab works incorrectly for Java AWT/Swing apps with modal dialogs
When a Java AWT/Swing application is showing a modal dialog, Alt+Tab doesn't work as expected for it. The application gets activated as expected, but it's not moving in the list of recently activated apps. This, in particular, results sometimes in Alt+Tab being 'stuck' on such an application (a single invocation of Alt+Tab not moving focus to another app).
Sample reproducer (ModalDialog.java file) is attached to the ticket. With any Java 11+ runtime installed (tested with openjdk-11-jre), it can be launched from terminal as java ModalDialog.java
. After the sample app is launched, press Alt+Tab several times. First time focus is switched back to terminal as expected, but then it's stuck on sample app. To switch to the terminal, Tab should be pressed twice, while Alt is held pressed.
Reproduced with Xfwm4 v4.16.1 on Linux Mint 21.