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

Side by Side Diff: bus/inputcontext.c

Issue 2884006: Make sure that we won't wrongly match a hotkey after losing and getting focus. (Closed) Base URL: ssh://gitrw.chromium.org/ibus.git
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* vim:set et sts=4: */ 1 /* vim:set et sts=4: */
2 /* ibus - The Input Bus 2 /* ibus - The Input Bus
3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com> 3 * Copyright (C) 2008-2010 Peng Huang <shawn.p.huang@gmail.com>
4 * Copyright (C) 2008-2010 Red Hat, Inc. 4 * Copyright (C) 2008-2010 Red Hat, Inc.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public 7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 void 1156 void
1157 bus_input_context_focus_in (BusInputContext *context) 1157 bus_input_context_focus_in (BusInputContext *context)
1158 { 1158 {
1159 g_assert (BUS_IS_INPUT_CONTEXT (context)); 1159 g_assert (BUS_IS_INPUT_CONTEXT (context));
1160 1160
1161 if (context->has_focus) 1161 if (context->has_focus)
1162 return; 1162 return;
1163 1163
1164 context->has_focus = TRUE; 1164 context->has_focus = TRUE;
1165 1165
1166 // To make sure that we won't use an old value left before we losing focus
1167 // last time.
1168 context->prev_keyval = IBUS_VoidSymbol;
1169 context->prev_modifiers = 0;
1170
1166 if (context->engine == NULL && context->enabled) { 1171 if (context->engine == NULL && context->enabled) {
1167 g_signal_emit (context, context_signals[REQUEST_ENGINE], 0, NULL); 1172 g_signal_emit (context, context_signals[REQUEST_ENGINE], 0, NULL);
1168 } 1173 }
1169 1174
1170 if (context->engine && context->enabled) { 1175 if (context->engine && context->enabled) {
1171 bus_engine_proxy_focus_in (context->engine); 1176 bus_engine_proxy_focus_in (context->engine);
1172 bus_engine_proxy_enable (context->engine); 1177 bus_engine_proxy_enable (context->engine);
1173 bus_engine_proxy_set_capabilities (context->engine, context->capabilitie s); 1178 bus_engine_proxy_set_capabilities (context->engine, context->capabilitie s);
1174 bus_engine_proxy_set_cursor_location (context->engine, context->x, conte xt->y, context->w, context->h); 1179 bus_engine_proxy_set_cursor_location (context->engine, context->x, conte xt->y, context->w, context->h);
1175 } 1180 }
(...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 2105
2101 return retval; 2106 return retval;
2102 } 2107 }
2103 2108
2104 guint 2109 guint
2105 bus_input_context_get_capabilities (BusInputContext *context) 2110 bus_input_context_get_capabilities (BusInputContext *context)
2106 { 2111 {
2107 g_assert (BUS_IS_INPUT_CONTEXT (context)); 2112 g_assert (BUS_IS_INPUT_CONTEXT (context));
2108 return context->capabilities; 2113 return context->capabilities;
2109 } 2114 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698