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

Issue 2568043: Enable key snooper by default (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by Yusuke Sato
Modified:
13 years, 6 months ago
Reviewers:
shawn.p.huang, Peng Huang
Base URL:
git@github.com:ibus/ibus.git
Visibility:
Public.

Description

Enable key snooper by default again, except Chrome/Chromium browsers, to fix application compatibility issues like 1068. This change is logically a revert of http://github.com/ibus/ibus/commit/7e715146794d5fa5324885f8d1dcebb8805bc31b The new behavior is: 1) If IBUS_DISABLE_SNOOPER environment variable is set, and the value of the variable is "" (an empty string) or "0" or "false" or "False" or "FALSE", key snooper is enabled. 2) If IBUS_DISABLE_SNOOPER environment variable is set, and the value of the variable is other than the 5 above, e.g. "1", "true", .., key snooper is disabled. 3) If IBUS_DISABLE_SNOOPER environment variable is not set, and ibus-daemon is explicitly configured with --disable-key-snooper, key snooper is disabled. 4) If IBUS_DISABLE_SNOOPER environment variable is not set, and ibus-daemon is not configured with --disable-key-snooper, the GTK_IM_MODULE, im-ibus.so, checks IBUS_NO_SNOOPER_APPS environment variable: 4-a) if IBUS_NO_SNOOPER_APPS environment variable is not set, and the application name matches ".*chrome", key snooper is disabled. 4-b) if IBUS_NO_SNOOPER_APPS environment variable, which should be comma-separated regexps, is set, and one of the regexps matches the application name, key snooper is disabled. 4-c) otherwise, key snooper is enabled. Please note that when no configure options nor no environment variables are set, key snooper is enabled on all applications except Chrome/Chromium web browsers. For example, key snooper would be enabled on xchat and gedit by default. I believe the new default behavior would satisfy both Linux desktop and Chromium OS requirements. Test: - With ibus built without --disable-key-snooper: yusukes@harapeko:~$ gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER= gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER=0 gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="0" gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="false" gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="False" gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="FALSE" gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="1" gedit # no-snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="true" gedit # no-snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="unknownstring" gedit # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS=gedit gedit # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS='g.*dit' gedit # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS='foobar,g.*dit' gedit # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS=foobar gedit # snoop yusukes@harapeko:~$ google-chrome # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS=foobar google-chrome # snoop - With ibus built with --disable-key-snooper: yusukes@harapeko:~$ gedit # no-snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="false" gedit # snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="true" gedit # no-snoop yusukes@harapeko:~$ IBUS_DISABLE_SNOOPER="unknownstring" gedit # no-snoop yusukes@harapeko:~$ IBUS_NO_SNOOPER_APPS=foobar gedit # no-snoop, because IBUS_NO_SNOOPER_APPS is ignored when --disable-key-snooper is specified. BUG=http://code.google.com/p/ibus/issues/detail?id=1068 TEST=manually done. see above.

Patch Set 1 #

Total comments: 2

Patch Set 2 : review fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -28 lines) Patch
M client/gtk2/ibusimcontext.c View 1 2 chunks +17 lines, -16 lines 0 comments Download
M configure.ac View 3 chunks +12 lines, -12 lines 0 comments Download

Messages

Total messages: 4
Yusuke Sato
13 years, 6 months ago (2010-10-20 05:58:32 UTC) #1
Peng
http://codereview.appspot.com/2568043/diff/1/client/gtk2/ibusimcontext.c File client/gtk2/ibusimcontext.c (right): http://codereview.appspot.com/2568043/diff/1/client/gtk2/ibusimcontext.c#newcode326 client/gtk2/ibusimcontext.c:326: g_strcmp0 (ibus_disable_snooper, "TRUE") == 0) { I think it ...
13 years, 6 months ago (2010-10-20 07:31:24 UTC) #2
Yusuke Sato
Thanks for the review. Addressed your comment and updated the CL description. Please take another ...
13 years, 6 months ago (2010-10-20 08:13:26 UTC) #3
Peng
13 years, 6 months ago (2010-10-20 08:26:33 UTC) #4
On 2010/10/20 08:13:26, Yusuke Sato wrote:
> Thanks for the review. Addressed your comment and updated the CL description.
> Please take another look.
> 
> http://codereview.appspot.com/2568043/diff/1/client/gtk2/ibusimcontext.c
> File client/gtk2/ibusimcontext.c (right):
> 
>
http://codereview.appspot.com/2568043/diff/1/client/gtk2/ibusimcontext.c#newc...
> client/gtk2/ibusimcontext.c:326: g_strcmp0 (ibus_disable_snooper, "TRUE") ==
0)
> {
> On 2010/10/20 07:31:24, Shawn.P.Huang wrote:
> > I think it is better to test ibus_disable_snooper == (NULL, "", "0",
"false",
> > "False" or "FALSE") as current code, and set _use_key_snooper to TRUE. For
all
> > of other situations, we keep _use_key_snooper to FALSE.
> 
> Done.

LGTM. THX.
Sign in to reply to this message.

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