GNOME Bugzilla – Bug 693815
Nautilus does always not take the focus when called from terminal
Last modified: 2021-06-18 15:16:00 UTC
This is basically the same of Bug 674816 that has been fixed only in case that nautilus is launched using the startup-id. I can reproduce this issue both on the Shell or not, basically just run nautilus in a terminal close the opened window but don't kill the process; in another terminal launch again nautilus: not all the windows launched are getting the focus. This is an issue caused by Gtk Bug 688830 (see the test case attached there), and can be easily "workarounded" using the attached patch.
Created attachment 236088 [details] [review] NautilusWindow: present the window when grabbing focus
Review of attachment 236088 [details] [review]: I don't think this is correct. - we shouldn't be working around GTK bugs at this level. I believe GtkApplication should set a better startup ID in before_emit() in this case? I suppose this is only an issue when launched from a terminal, right? - nautilus_window_grab_focus() would be the wrong place to do this anyway, we should do this where we create and present the window
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.