DescriptionEnable 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 #
MessagesTotal messages: 4
|