Bug 2268149 - Alt-tabbing into a Java Xwayland window breaks keyboard input
Summary: Alt-tabbing into a Java Xwayland window breaks keyboard input
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mutter
Version: 40
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: GNOME SIG Unassigned
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F40FinalBlocker, FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2024-03-06 12:14 UTC by Ondřej Budai
Modified: 2024-03-20 19:56 UTC (History)
9 users (show)

Fixed In Version: mutter-46.0-1.fc40
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-03-20 19:56:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Gitlab GNOME mutter issues 3328 0 None closed Keyboard input focus broken for globally active Xwayland windows 2024-03-11 12:34:27 UTC

Description Ondřej Budai 2024-03-06 12:14:43 UTC
Tested with mutter-46~rc-1.fc40.x86_64

When alt-tabbing from a wayland window to a Java xwayland window, I cannot send any keyboard input to the Java window. When I type, the input simply goes into the previous wayland window (e.g. firefox, or tilix).

This bug appears when using any of the JetBrains IDEs (Java-based), or even when using a simple Java application taken from https://www.codejava.net/java-se/swing/jtextfield-basic-tutorial-and-examples. Both applications work fine on Fedora 39.

This is already reported upstream here: https://gitlab.gnome.org/GNOME/mutter/-/issues/3328

Reproducible: Always

Steps to Reproduce:
1. Use Firefox
2. Switch to a Java-app (e.g. PyCharm)
3. Type something
Actual Results:  
The keystrokes are sent to Firefox.

Expected Results:  
The keystrokes are sent to the Java app.

Comment 1 Fedora Blocker Bugs Application 2024-03-06 12:15:53 UTC
Proposed as a Blocker for 40-final by Fedora user obudai using the blocker tracking app because:

 This bug affects all Java applications and basically makes them usable. Thus, I strongly believe that this violates the Window manager functionality release criterium.

Comment 2 Ondřej Budai 2024-03-11 09:24:36 UTC
According to other reports, this also breaks many Wine apps.

There's now an upstream patch: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3651

I built a COPR repository with it, and it fixed my issue: https://copr.fedorainfracloud.org/coprs/obudai/mutter-pr-3651/

I asked upstream if this gets included in the final mutter 46 release. If it doesn't, I will propose a downstream patch in Fedora.

Comment 3 Kamil Páral 2024-03-11 12:42:34 UTC
I can confirm this issue with CardManager (first java app I found) from Fedora repos. The same mutter version.

Comment 4 Tomas Popela 2024-03-12 14:30:20 UTC
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3651 was merged upstream.

Comment 5 Fedora Update System 2024-03-18 16:26:31 UTC
FEDORA-2024-1ed0b13d87 (gnome-shell-46.0-1.fc40, gnome-shell-extensions-46.0-1.fc40, and 1 more) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ed0b13d87

Comment 6 Kamil Páral 2024-03-19 11:38:03 UTC
(In reply to Fedora Update System from comment #5)
> FEDORA-2024-1ed0b13d87 (gnome-shell-46.0-1.fc40,
> gnome-shell-extensions-46.0-1.fc40, and 1 more) has been submitted as an
> update to Fedora 40.
> https://bodhi.fedoraproject.org/updates/FEDORA-2024-1ed0b13d87

With this update, I see no further issue with CardManager.

Comment 7 Fedora Update System 2024-03-20 19:56:11 UTC
FEDORA-2024-1ed0b13d87 (gnome-shell-46.0-1.fc40, gnome-shell-extensions-46.0-1.fc40, and 1 more) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.