From ae0cfe3dc0be2506506e7023b0f01f6b6e4d49c6 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Mon, 29 May 2006 12:33:18 +0000 Subject: [PATCH] make sure text widgets get all key events first. Fixes bug #301006. 2006-05-29 Michael Natterer * app/widgets/gimpdock.c (gimp_dock_key_press_event): make sure text widgets get all key events first. Fixes bug #301006. --- ChangeLog | 9 +++++++-- app/widgets/gimpdock.c | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c76020c88a..4b3797d497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-29 Michael Natterer + + * 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 * plug-ins/script-fu/script-fu-server.c: suppress progress popups @@ -26,8 +31,8 @@ 2006-05-28 Michael Natterer Applied patch from David Gowers which adds actions to select - palette and colormap colors with actions. Modified the patch quite - a bit. Fixes bug #130123. + palette and colormap colors. Modified the patch quite a bit. + Fixes bug #130123. * app/widgets/gimpcolormapeditor.[ch] * app/widgets/gimppaletteeditor.[ch]: add functions get_index() diff --git a/app/widgets/gimpdock.c b/app/widgets/gimpdock.c index 1bae0ba10f..5893a167e1 100644 --- a/app/widgets/gimpdock.c +++ b/app/widgets/gimpdock.c @@ -318,6 +318,7 @@ gimp_dock_key_press_event (GtkWidget *widget, GdkEventKey *event) { GtkWindow *window = GTK_WINDOW (widget); + GtkWidget *focus = gtk_window_get_focus (window); gboolean handled = FALSE; /* 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. */ + /* 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 */ if (! handled && event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) handled = gtk_window_activate_key (window, event);