GNOME Bugzilla – Bug 322210
Error console grabs focus
Last modified: 2008-01-15 13:02:38 UTC
The error console (File->dialogues->Error Console) displays messages that are produced by Script-FU scripts, for example. Developping and debugging a script typically involves a lot of messages to be output to that console. However, the console window grabs the focus from the currently active window whenever a new message appears. This can be annoying to the user when she is actually typing in a different window and has to give back the focus to her window manually every time the console misbehaves. I suggest to make the focus behaviour at least optionally. Other information:
what about using the output on stderr instead?
Alright, that's an option. However, I still believe grabbing focus is a bad habit for any application in general. Redirecting to stderr also means to start the GIMP from the console prompt (or have a console started along with the GIMP every time) which is cumbersome and desktop-cluttering. I like the idea of the integrated error console in the GIMP; it is a pity that people might refrain from using it just because of this simple misfeature.
Well, the error console needs to come to front whenever a new error message is being displayed. Otherwise the message will likely go unnoticed. We are using gtk_window_present() to do this. Perhaps there's a better way.
Easy enough: 2005-11-24 Sven Neumann <sven@gimp.org> * app/gui/gui-vtable.c (gui_message): only show the error console but don't move the keyboard focus to it. Fixes bug #322210.
Argh, unfortunately that doesn't quite work since it's the wrong place for the fix. Reopening.
I wonder whether we want to use gtk_widget_show() instead of gtk_window_present() in gimp_dialog_factory_dialog_raise(). That would change the behaviour for all docks. Alternatively we could specify the desired behaviour depending on the dialog that the factory is handling. The error console (and perhaps other dockables) could then set a flag that they don't want to receive keyboard focus when they are being raised.
A sufficiently elegant way is perhaps to have the window raised and grabbed only for certain types of messages. Talking at Script-FU level, this might involve introducing (gimp-error-message "") in addition to (gimp-message "") and only have windows raised and grabbed for the first.
This is all far beyond the changes that are still possible for GIMP 2.4. Bumping to the Future milestone.
2006-11-22 Sven Neumann <sven@gimp.org> * app/gui/gui-message.c (gui_message_error_console): don't raise and focus the error console for not so severe error messages. Fixes bug #322210 and bug #373254.