Alt+Tab is broken for Java (AWT/Swing) apps in Wayland session
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mutter (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Jammy |
Fix Released
|
Low
|
Unassigned |
Bug Description
Impact
------
When switching to a Java UI application using Alt+Tab, very often application's window is raised, but it doesn't get keyboard focus - it stays in the previous application, and that application continues to process keyboard events. When the problem occurs, hovering mouse over Java app's window gets the focus transferred to it.
This problem only happens in Wayland session, not in X.Org session. It can be reproduced in Ubuntu 22.04, but not in 20.04.4 version.
The problem seems to affect all Java versions - reproduced for different OpenJDK builds (8, 11, 17, 18). It can also be observed for Java version provided by Ubuntu's 'default-jre' package (11.0.15+
Test Case
---------
1. sudo apt install default-jre
2. Download the minimal test case app from comment #1
3. From a terminal run the app
java Downloads/
4. Click on the terminal window (instead of the Java app)
5. Press Alt-Tab to switch focus back to the Java app
6. Type a few characters.
The characters should show in the Java app's text field instead of in the terminal window.
What Could Go Wrong
-------------------
See the master bug for this update at LP: #1972726
Changed in mutter (Ubuntu): | |
importance: | Undecided → Low |
Changed in mutter (Ubuntu Jammy): | |
importance: | Undecided → Low |
status: | New → In Progress |
description: | updated |
Status changed to 'Confirmed' because the bug affects multiple users.