aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2010-04-13 20:39:55 +0300
committerClaudio Saavedra <csaavedra@igalia.com>2010-04-13 20:42:37 +0300
commit8642b6991fe6c9a6fc4fdf98e091a17817cea6af (patch)
treef5ed9d9668c994999b4ac344d09029de6b4a39e0
parent265a52daadea1a065f0e6cdb39d3f5543ce255a8 (diff)
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)
-rw-r--r--hildon/hildon-live-search.c8
1 files 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.