Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 2268149

Summary: Alt-tabbing into a Java Xwayland window breaks keyboard input
Product: [Fedora] Fedora Reporter: Ondřej Budai <obudai>
Component: mutterAssignee: GNOME SIG Unassigned <gnome-sig>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 40CC: fmuellner, gnome-sig, jadahl, kparal, otaylor, philip.wyett, robatino, tpopela, walters
Target Milestone: ---Keywords: Desktop
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: mutter-46.0-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-03-20 19:56:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2187794    

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.