Focus stays on already opened windows instead of the launched application window. The result is that you type into the obscured window instead. When launching multiple terminals this can be very confusing and possibly dangerous. Reproducible: Always Steps to Reproduce: 1. Login 2. Open an application (gnome terminal works, but so does Chrome) 3. See application get focus (cursor looks normal, typing works) 4. Open a second window for the same application or open any other application 5. Expect the focus to be on the newly opened application/window 6. Type anything and discover the focus is still on the previous window 7. Open any new application (even after closing all previously opened windows) and see they do not receive focus Actual Results: Focus stays inside obscured window instead of newly opened one. Expected Results: Set focus on the opened window. This bug is very dangerous. I have already entered several 'kill' and 'rm' commands into the wrong terminal sessions. Just got lucky nothing matched so no disasters yet. But that is just a matter of time.
Switching to mutter since it is a mutter issue. I have also reported this issue as BZ#2210556, however your issue is an older one, so I am closing my ticket and copying the text from it here: This is already reported in upstream (see the link in Additional Information), however I am also reporting it in downstream since it can be considered as a possible security issue. When a new app window is opened from shell overview, focus is in most cases not properly given to the new window and user input still goes to the old focused window. Both windows appear to be in focus, however, the old window has the proper focus. This is a potential security issue that almost made me type my password and other sensitive data into Slack/IRC instead of terminal multiple times. Reproducible: Sometimes Steps to Reproduce: 1. Use latest, fully updated Fedora Workstation 38 system. 2. Open shell overview (super key). 3. Run the "Terminal" app either by using mouse or keyboard. 4. See if the newly opened window has focus. Actual Results: See the attached screenshot. It happens very often. In some apps (for example the new GNOME "Console" app), there is even no indication that the window does not have focus. (See the screencast in linked upstream ticket.) Expected Results: The newly opened window has focus. https://gitlab.gnome.org/GNOME/mutter/-/issues/2690
Created attachment 1969527 [details] No focus on newly opened Terminal window
*** Bug 2210556 has been marked as a duplicate of this bug. ***
*** Bug 2192155 has been marked as a duplicate of this bug. ***
*** Bug 2190514 has been marked as a duplicate of this bug. ***
There is now a fix available for Wayland users: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3105 It is currently waiting to be merged upstream.
The proposed fix from !3105 sadly did not get accepted: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3105#note_1805643 https://gitlab.gnome.org/GNOME/mutter/-/issues/2690#note_1806257
There is now a correct fix for gnome-44 that will hopefully get merged soon (it already got merged into main/gnome-45): https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3186
The update that fixes this issue[1] is now in stable F38. [1] https://bodhi.fedoraproject.org/updates/FEDORA-2023-2da9200945