Opening files from terminal: gimp steals focus for each file
GIMP version: 2.10.8
Operating System: Debian GNU/Linux
Package: gimp 2.10.8-2 Debian package
Description of the bug
When opening files using a command from a terminal window (not using the gimp menu), gimp steals the window manager focus every time a new file is opened, instead of opening files in the background and keeping the terminal window focused.
Is the bug reproducible? [Always]
- Gimp is already open; the gimp window is minimised/hidden/unfocused in the window manager
- From a terminal window, run
gimp file1.jpg file2.jpg
Expected result: gimp should open the two image files "in the background" without changing the gimp window's current state (minimised/hidden/unfocused); the window manager focus should stay on the terminal window.
Actual result: every time a new file is opened, the gimp window is raised and steals focus (this happens both with gimp in single-window or multi-window mode)
My window manager is icewm in focus-follows-mouse mode, but I don't think this is a wm problem. In the same environment, firefox behaves in the way I expect, e.g. if I run
firefox some-url in a terminal, the focus stays on the terminal and firefox opens the url in the background; I'd like gimp to behave in the same way.
I couldn't find a way to tweak this behaviour in the gimp command line options or in the Preferences -> Window Management panel ("Activate the focused image" is not relevant), so I guess this is hard-coded at the moment, right?
If that's the case, I'd suggest to add a new preference option ("Focus new image windows automatically"?) to implement the behaviour I expect (and keeping the current behaviour as the default, since I guess most users will still prefer that).