The problem seems to be related to Java apps using 'Globally Active' input focus model (as per https://www.x.org/releases/current/doc/xorg-docs/icccm/icccm.html#Input_Focus). I'm attaching a minimal native X application's code, for which the problem can be reproduced as well - see focusTest.c file. Steps to reproduce are the same as for Java app - launch the app from terminal, click back at terminal window, press Alt+Tab, then type some text. App's window will be raised but won't receive keyboard focus, while will still receive X protocol's FocusIn event.
The problem seems to be related to Java apps using 'Globally Active' input focus model (as per https:/ /www.x. org/releases/ current/ doc/xorg- docs/icccm/ icccm.html# Input_Focus). I'm attaching a minimal native X application's code, for which the problem can be reproduced as well - see focusTest.c file. Steps to reproduce are the same as for Java app - launch the app from terminal, click back at terminal window, press Alt+Tab, then type some text. App's window will be raised but won't receive keyboard focus, while will still receive X protocol's FocusIn event.