After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 322210 - Error console grabs focus
Error console grabs focus
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: User Interface
2.2.x
Other All
: Normal minor
: Future
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2005-11-23 08:29 UTC by Fritz Jetzek
Modified: 2008-01-15 13:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Fritz Jetzek 2005-11-23 08:29:46 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:
Comment 1 Sven Neumann 2005-11-24 10:53:24 UTC
what about using the output on stderr instead? 
Comment 2 Fritz Jetzek 2005-11-24 11:10:15 UTC
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.
Comment 3 Sven Neumann 2005-11-24 15:13:49 UTC
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.
Comment 4 Sven Neumann 2005-11-24 15:34:00 UTC
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.
Comment 5 Sven Neumann 2005-11-24 15:38:39 UTC
Argh, unfortunately that doesn't quite work since it's the wrong place for the
fix. Reopening.
Comment 6 Sven Neumann 2005-11-24 15:44:20 UTC
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.
Comment 7 Fritz Jetzek 2005-11-24 16:26:38 UTC
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.
Comment 8 Sven Neumann 2006-06-27 18:18:30 UTC
This is all far beyond the changes that are still possible for GIMP 2.4. Bumping to the Future milestone.
Comment 9 Sven Neumann 2006-11-22 16:29:11 UTC
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.