From 8642b6991fe6c9a6fc4fdf98e091a17817cea6af Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Tue, 13 Apr 2010 20:39:55 +0300 Subject: Pass ctrl+space to the GtkEntry in HildonLiveSearch This allows IM to do its work and switch the keyboard layout. Fixes: NB#155362 (Cannot change language in Contacts from keyboard) --- hildon/hildon-live-search.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hildon/hildon-live-search.c b/hildon/hildon-live-search.c index 959fc3a..e79c1f8 100644 --- a/hildon/hildon-live-search.c +++ b/hildon/hildon-live-search.c @@ -465,11 +465,15 @@ on_key_press_event (GtkWidget *widget, if (GTK_WIDGET_VISIBLE (priv->kb_focus_widget)) { /* If the live search is hidden, Ctrl+whatever is always - * passed to the focus widget */ + * passed to the focus widget, with the exception of + * Ctrl + Space, which is given to the entry, so that the input method + * is allowed to switch the keyboard layout. */ if (GTK_WIDGET_VISIBLE (live_search) || !(event->state & GDK_CONTROL_MASK || event->keyval == GDK_Control_L || - event->keyval == GDK_Control_R)) { + event->keyval == GDK_Control_R) || + (event->state & GDK_CONTROL_MASK && + event->keyval == GDK_space)) { GdkEvent *new_event; /* If the entry is realized and has focus, it is enough to catch events. -- cgit v1.2.3-18-g5258