static void __toggle_preedit_status(XIMHandle* handle, bool flag) { if (flag) xim_start_preedit(handle); else xim_cancel_preedit(handle); }
static int _xim_trigger_notify(XIMHandle* handle, IMTriggerNotifyStruct* proto) { LOG("trigger key pressed, %d", proto->icid); IC* ic = icmgr_get(proto->icid); if (ic == NULL) return 1; icmgr_set_current(proto->icid); ic->is_enabled = true; xim_start_preedit(handle); icmgr_refresh(); return 1; }