void-packages/srcpkgs/mozc/patches/default_hiragana_from_envir...

21 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