怎么防止 dbus-call-method 修改 last-input-event

dbus-call-method 之后 last-input-event 就不对了,例如

(dbus-call-method :session
                "org.fcitx.Fcitx5"
                "/controller"
                "org.fcitx.Fcitx.Controller1"
                "State")

导致 expand-region 错误。

自动通过dbus发送消息更新输入法状态可以绕过这个问题,不知为啥下面的代码没发应

(setq imbot--active-checked nil)

(defun imbot--update-state (value)
    "Update `imbot--active-checked'."
    (setq imbot--active-checked value))

(dbus-register-signal :session
                "org.fcitx.Fcitx5"
                "/StatusNotifierItem"
                "org.kde.StatusNotifierItem"
                "NewStatus"
                #'imbot--update-state)