Closed chuangzhu closed 3 years ago
Still not solved, the code below crashes fcitx5 when switching input method.
local fcitx = require("fcitx")
-- fcitx.watchEvent(fcitx.EventType.InputMethodActivated, "switch_input_method")
fcitx.watchEvent(fcitx.EventType.SwitchInputMethod, "switch_input_method")
function switch_input_method()
-- print(im)
return false
end
=========================
Fcitx 5.0.7 -- Get Signal No.: 11
Date: try "date -d @1619326822" if you are using GNU date ***
ProcessID: 181087
fcitx5(+0xbdae)[0x5648d01b3dae]
/usr/lib/libc.so.6(+0x3cf80)[0x7fa6df3f3f80]
/usr/lib/libc.so.6(+0x15c9fe)[0x7fa6dd8269fe]
[1] + 181087 exit 1 fcitx5
@wengxt Please reopen this issue.
The script below causes fcitx5 failing to start:
Changing the event type to
fcitx.EventType.InputMethodDeactivated
, the handler is called on both activated and deactivated. Argument the handler receives seems to be the name of current input method:I investigated a little bit into the code, and I think it is caused by a mismatch in the definition of
EventType
between fcitx5 and base.lua.