Commit b07cbb50 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

fiddle with the "focus-on-map" window hint to prevent the dialogs from

2005-12-29  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimpdialogfactory.c (gimp_dialog_factories_show_foreach):
	fiddle with the "focus-on-map" window hint to prevent the dialogs
	from grabbing the focus away from the image window. Fixes bug #167762
	for window managers supporting this hint.

	* app/display/gimpdisplayshell-callbacks.c: removed redundant call
	to gdk_window_focus() that wasn't having the desired effect anyway.
parent 0f0a0f4b
2005-12-29 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdialogfactory.c (gimp_dialog_factories_show_foreach):
fiddle with the "focus-on-map" window hint to prevent the dialogs
from grabbing the focus away from the image window. Fixes bug #167762
for window managers supporting this hint.
* app/display/gimpdisplayshell-callbacks.c: removed redundant call
to gdk_window_focus() that wasn't having the desired effect anyway.
2005-12-29 Simon Budig <simon@gimp.org>
* tools/pdbgen/pdb/image.pdb: new function:
......
......@@ -1209,8 +1209,6 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
else
{
gimp_dialog_factories_toggle ();
gdk_window_focus (canvas->window, time);
}
return_val = TRUE;
......
......@@ -1337,7 +1337,19 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
if (! GTK_WIDGET_VISIBLE (list->data) &&
visibility == GIMP_DIALOG_VISIBILITY_VISIBLE)
{
gtk_widget_show (GTK_WIDGET (list->data));
GtkWindow *window = GTK_WINDOW (list->data);
gboolean focus_on_map = gtk_window_get_focus_on_map (window);
if (focus_on_map)
gtk_window_set_focus_on_map (window, FALSE);
gtk_widget_show (window);
if (GTK_WIDGET_VISIBLE (window))
gdk_window_raise (GTK_WIDGET (window)->window);
if (focus_on_map)
gtk_window_set_focus_on_map (window, TRUE);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment