void-packages/srcpkgs/mozc/patches/default_hiragana_from_environment.patch
Matthias von Faber c90670d8b9 New package: mozc-2.23.2815.102
Co-authored-by: maxice8 <thinkabit.ukim@gmail.com>
2019-03-09 17:26:33 -03:00

20 lines
811 B
Diff

--- mozc/src/unix/ibus/property_handler.cc
+++ mozc/src/unix/ibus/property_handler.cc
@@ -40,6 +40,8 @@
#include "unix/ibus/mozc_engine_property.h"
#include "unix/ibus/path_util.h"
+#include <cstdlib>
+
// On Gnome Shell with IBus 1.5, new property named "symbol" is used to
// represent the mode indicator on the system panel. Note that "symbol" does
// not exist in IBus 1.4.x.
@@ -80,7 +82,7 @@ bool GetDisabled(IBusEngine *engine) {
// On IBus 1.4.x, IBus expects that an IME should always be turned on and
// IME on/off keys are handled by IBus itself rather than each IME.
#if IBUS_CHECK_VERSION(1, 5, 0)
-const bool kActivatedOnLaunch = false;
+const bool kActivatedOnLaunch = !!::std::getenv("IBUS_MOZC_DEFAULT_HIRAGANA");
#else
const bool kActivatedOnLaunch = true;
#endif // IBus>=1.5.0