make sure text widgets get all key events first. Fixes bug #301006.

2006-05-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdock.c (gimp_dock_key_press_event): make sure
	text widgets get all key events first. Fixes bug #301006.
This commit is contained in:
Michael Natterer 2006-05-29 12:33:18 +00:00 committed by Michael Natterer
parent 8e39085306
commit ae0cfe3dc0
2 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-05-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdock.c (gimp_dock_key_press_event): make sure
text widgets get all key events first. Fixes bug #301006.
2006-05-29 Sven Neumann <sven@gimp.org> 2006-05-29 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/script-fu-server.c: suppress progress popups * plug-ins/script-fu/script-fu-server.c: suppress progress popups
@ -26,8 +31,8 @@
2006-05-28 Michael Natterer <mitch@gimp.org> 2006-05-28 Michael Natterer <mitch@gimp.org>
Applied patch from David Gowers which adds actions to select Applied patch from David Gowers which adds actions to select
palette and colormap colors with actions. Modified the patch quite palette and colormap colors. Modified the patch quite a bit.
a bit. Fixes bug #130123. Fixes bug #130123.
* app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimpcolormapeditor.[ch]
* app/widgets/gimppaletteeditor.[ch]: add functions get_index() * app/widgets/gimppaletteeditor.[ch]: add functions get_index()

View File

@ -318,6 +318,7 @@ gimp_dock_key_press_event (GtkWidget *widget,
GdkEventKey *event) GdkEventKey *event)
{ {
GtkWindow *window = GTK_WINDOW (widget); GtkWindow *window = GTK_WINDOW (widget);
GtkWidget *focus = gtk_window_get_focus (window);
gboolean handled = FALSE; gboolean handled = FALSE;
/* we're overriding the GtkWindow implementation here to give /* we're overriding the GtkWindow implementation here to give
@ -325,6 +326,10 @@ gimp_dock_key_press_event (GtkWidget *widget,
* before the accelerator activation scheme. * before the accelerator activation scheme.
*/ */
/* text widgets get all key events first */
if (G_UNLIKELY (GTK_IS_EDITABLE (focus) || GTK_IS_TEXT_VIEW (focus)))
handled = gtk_window_propagate_key_event (window, event);
/* invoke control/alt accelerators */ /* invoke control/alt accelerators */
if (! handled && event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) if (! handled && event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))
handled = gtk_window_activate_key (window, event); handled = gtk_window_activate_key (window, event);