Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(885)

Unified Diff: bus/inputcontext.c

Issue 3052003: Support switching keyboard by hotkey without input focus (Closed) Base URL: ssh://git@chromiumos-git/ibus.git
Patch Set: Do not connect 'forward-ket-event' signal Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bus/inputcontext.h ('k') | client/gtk2/ibusimcontext.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bus/inputcontext.c
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
index 02e02c316f63678144581dfa42e0a8963371458f..c7f2dfb25e60d65479c3f6f1699c7d9caf37f658 100644
--- a/bus/inputcontext.c
+++ b/bus/inputcontext.c
@@ -171,6 +171,9 @@ bus_input_context_new (BusConnection *connection,
context->connection = connection;
context->client = g_strdup (client);
+ /* it is a fake input context, just need process hotkey */
+ context->fake = (g_strcmp0 (client, "fake") == 0);
+
g_signal_connect (context->connection,
"destroy",
(GCallback) _connection_destroy_cb,
@@ -701,7 +704,8 @@ _ic_process_key_event (BusInputContext *context,
}
}
- if (context->has_focus && context->enabled && context->engine) {
+ /* ignore key events, if it is a fake input context */
+ if (context->has_focus && context->enabled && context->engine && context->fake == FALSE) {
CallData *call_data;
call_data = g_slice_new (CallData);
« no previous file with comments | « bus/inputcontext.h ('k') | client/gtk2/ibusimcontext.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698