Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14)

Issue 4287054: Do not block UI in IBusIMContext anymore. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 8 months ago by Peng
Modified:
13 years, 8 months ago
Reviewers:
Yusuke Sato, fujiwara
CC:
satorux
Base URL:
git@github.com:ibus/ibus.git@master
Visibility:
Public.

Description

Do not block UI in IBusIMContext anymore. Replace some block IPC calls with async IPC calls, and then IBusIMContext will not block UI anymore. BUG=http://crosbug.com/12310 TEST=Linux desktop

Patch Set 1 #

Patch Set 2 : Update #

Patch Set 3 : Fix debian build issue #

Total comments: 15

Patch Set 4 : Fix issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+482 lines, -106 lines) Patch
M bus/ibusimpl.c View 3 chunks +0 lines, -5 lines 0 comments Download
M bus/inputcontext.c View 2 chunks +3 lines, -1 line 0 comments Download
M client/gtk2/ibusimcontext.c View 1 2 3 4 chunks +128 lines, -51 lines 0 comments Download
M debian/libibus-1.0-0.symbols View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/ibusbus.h View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M src/ibusbus.c View 1 2 3 3 chunks +90 lines, -18 lines 0 comments Download
M src/ibusinputcontext.h View 1 2 3 2 chunks +69 lines, -7 lines 0 comments Download
M src/ibusinputcontext.c View 1 2 3 3 chunks +91 lines, -6 lines 0 comments Download
M src/tests/ibus-bus.c View 1 2 3 1 chunk +93 lines, -14 lines 0 comments Download

Messages

Total messages: 4
Peng
13 years, 8 months ago (2011-03-16 17:22:45 UTC) #1
Yusuke Sato
Thanks for working on this!! http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c File client/gtk2/ibusimcontext.c (right): http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c#newcode1360 client/gtk2/ibusimcontext.c:1360: /* Cancel previouse create ...
13 years, 8 months ago (2011-03-17 12:29:05 UTC) #2
Peng
Updated the CL. Please check it again. http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c File client/gtk2/ibusimcontext.c (right): http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c#newcode1360 client/gtk2/ibusimcontext.c:1360: /* Cancel ...
13 years, 8 months ago (2011-03-17 14:10:10 UTC) #3
Yusuke Sato
13 years, 8 months ago (2011-03-17 14:48:18 UTC) #4
LGTM, thanks!

On 2011/03/17 14:10:10, Peng wrote:
> Updated the CL. Please check it again.
> 
> http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c
> File client/gtk2/ibusimcontext.c (right):
> 
>
http://codereview.appspot.com/4287054/diff/6001/client/gtk2/ibusimcontext.c#n...
> client/gtk2/ibusimcontext.c:1360: /* Cancel previouse create input context
> request */
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > typo: previous
> 
> Done.
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusbus.c
> File src/ibusbus.c (right):
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusbus.c#newcode599
> src/ibusbus.c:599: g_dbus_connection_call (bus->priv->connection,
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > Please add a short comment that explains why we can't use
ibus_bus_call_async
> > here.
> 
> Done.
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusbus.h
> File src/ibusbus.h (right):
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusbus.h#newcode461
> src/ibusbus.h:461: * ibus_bus_reate_input_context_async:
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > typo: create
> 
> Done.
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusbus.h#newcode472
> src/ibusbus.h:472: void        ibus_bus_create_input_context_async
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > could you add the following tests to src/tests/ibus-bus.c?
> > 
> > 1. call this function, then cancel the async operation.
> > 2. call this function twice (or more) quickly.
> > 3. do both 1 and 2.
> > ..
> > 
> > Cancellation is hard.
> 
> Done.
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusinputcontext.c
> File src/ibusinputcontext.c (right):
> 
>
http://codereview.appspot.com/4287054/diff/6001/src/ibusinputcontext.c#newcod...
> src/ibusinputcontext.c:626: initable = g_initable_new
(IBUS_TYPE_INPUT_CONTEXT,
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > I didn't know that g_initable_new is a synchronous call.
> > Maybe we should add async version of ibus_config_new to ibusconfig.c as
well?
> 
> I noticed this. I will try to fix it in another CL
> 
> http://codereview.appspot.com/4287054/diff/6001/src/ibusinputcontext.h
> File src/ibusinputcontext.h (right):
> 
>
http://codereview.appspot.com/4287054/diff/6001/src/ibusinputcontext.h#newcod...
> src/ibusinputcontext.h:111: *      or %NULL if you don't care about the result
> of the method invocation.
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > Is it okay to pass a NULL callback to the function?
> 
> Done.
> 
>
http://codereview.appspot.com/4287054/diff/6001/src/ibusinputcontext.h#newcod...
> src/ibusinputcontext.h:154: *      or %NULL if you don't care about the result
> of the method invocation.
> On 2011/03/17 12:29:05, Yusuke Sato wrote:
> > ditto. passing NULL to the function does not make sense?
> 
> Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b