arakiken / mlterm

Other
147 stars 13 forks source link

Activating Fcitx causes mouse to be constantly selecting #53

Open alisapa opened 1 year ago

alisapa commented 1 year ago

Input works normally while Fcitx is inactive. But when I activate Fcitx using Ctrl+Space, MLterm starts treating the mouse as if button 1 was pressed, selecting text whenever I move the cursor.

This is the minimal .xinitrc that reproduces the issue for me (I also tested with i3 and startxfce4 instead of xmonad and the issue appeared; it seems to not depend on the window manager):

eval "$(dbus-launch --sh-syntax --exit-with-session)"
export XMODIFIERS=@im=fcitx
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
fcitx -d
exec xmonad

It seems not to depend on the fcitx flag either, as the issue also appears when I try a minimal configuration as described in README:

./configure --without-map-table --without-prop-table --disable-image --disable-dl-ctl \
  --disable-fribidi --disable-dl-type --disable-otl \
  --disable-ssh2 --disable-utmp --disable-dnd --disable-kbd --disable-uim \
  --disable-m17nlib --disable-ibus --disable-fcitx --disable-scim --disable-canna \
  --disable-wnn --disable-skk --disable-iiimf --disable-ind --with-type-engines=xcore \
  --disable-anti-alias --disable-fontconfig (--disable-shared)

This report on the mailing list describes an issue very similar to mine: https://sourceforge.net/p/mlterm/mailman/message/37022073/ However, the report does not mention Fcitx.

arakiken commented 1 year ago

Sorry for replying late. In my environment (xmonad 0.17.1, fcitx 4.2.9.9 with anthy 9100h, mlterm 3.9.2), mlterm with --im xim or --im fcitx works fine. Will you tell me input method you use on fcitx ?

hramrach commented 1 year ago

Works for me as well with --im xim or --im fcitx XMODIFIERS=@im=fcitx GTK_IM_MODULE=fcitx QT_IM_MODULE=fcitx QT_IM_SWITCHER=imsw-multi

xmonad 0.17.1 mlterm 3.9.2 fcitx 5.0.21 mozc 2.28.4715.102

arakiken commented 1 year ago

I was able to reproduce this problem, and found the cause of it. This commit fixes it. https://github.com/arakiken/mlterm/commit/43579773849f542643655bbb36e18b13677ee6fc