fcitx / fcitx5

maybe a new fcitx.
1.56k stars 117 forks source link

The tray menu does not show options for the current input method (X11 only) #793

Closed David-JonesDVN closed 1 year ago

David-JonesDVN commented 1 year ago

Describe the bug Some input methods contain options that can be changed through the Fcitx5 tray icon menu. Right clicking the tray icon causes the input method to be switched off as the tray menu appears, preventing you from changing its options through the tray menu.

To Reproduce Steps to reproduce the behavior:

  1. Open Fcitx5 on an X11 KDE session
  2. Switch to an input method that contains options in the tray menu (eg. Mozc)
  3. Right click on the tray icon
  4. The input method is switched off as the tray menu appears. The menu will even appear higher than normal, as if making room for the options that should be there.

Expected behavior The tray menu should contain the options for the currently selected input method, and the input method should not be switched off by right clicking the tray icon.

Desktop (please complete the following information):

# System Info:
1.  `uname -a`:

        Linux DVN-PC 6.3.1-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 04 May 2023 01:47:06 +0000 x86_64 GNU/Linux

2.  `lsb_release -a`:

        LSB Version:    n/a
        Distributor ID: Artix
        Description:    Artix Linux
        Release:    rolling
        Codename:   community-qt-openrc-20220713

3.  `lsb_release -d`:

        Description:    Artix Linux

4.  `/etc/lsb-release`:

        DISTRIB_ID="Artix"
        DISTRIB_RELEASE="rolling"
        DISTRIB_DESCRIPTION="Artix Linux"
        DISTRIB_CODENAME=community-qt-openrc-20220713

6.  `/etc/os-release`:

        NAME="Artix Linux"
        PRETTY_NAME="Artix Linux"
        ID=artix
        BUILD_ID=rolling
        ANSI_COLOR="0;36"
        HOME_URL="https://www.artixlinux.org/"
        DOCUMENTATION_URL="https://wiki.artixlinux.org/"
        SUPPORT_URL="https://forum.artixlinux.org/"
        BUG_REPORT_URL="https://bugs.artixlinux.org/"
        PRIVACY_POLICY_URL="https://terms.artixlinux.org/docs/privacy-policy/"
        LOGO=artixlinux-logo

7.  Desktop Environment:

    Desktop environment is `kde`.

8.  XDG SESSION TYPE:

        XDG_SESSION_TYPE='x11'

9.  Bash Version:

        BASH_VERSION='5.1.16(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'

        WAYLAND_DISPLAY=''

2.  Keyboard Layout:

    1.  `setxkbmap`:

            xkb_keymap {
                xkb_keycodes  { include "evdev+aliases(qwerty)" };
                xkb_types     { include "complete"  };
                xkb_compat    { include "complete"  };
                xkb_symbols   { include "pc+us+inet(evdev)+terminate(ctrl_alt_bksp)"    };
                xkb_geometry  { include "pc(pc105)" };
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", "terminate:ctrl_alt_bksp"

3.  Locale:

    1.  All locales:

            C
            C.UTF-8
            en_US.utf8
            POSIX

    2.  Current locale:

            LANG=en_US.UTF-8
            LC_CTYPE="en_US.UTF-8"
            LC_NUMERIC=en_US.UTF-8
            LC_TIME=en_US.UTF-8
            LC_COLLATE="en_US.UTF-8"
            LC_MONETARY=en_US.UTF-8
            LC_MESSAGES="en_US.UTF-8"
            LC_PAPER=en_US.UTF-8
            LC_NAME=en_US.UTF-8
            LC_ADDRESS=en_US.UTF-8
            LC_TELEPHONE=en_US.UTF-8
            LC_MEASUREMENT=C
            LC_IDENTIFICATION=en_US.UTF-8
            LC_ALL=

4.  Directories:

    1.  Home:

            /home/dvn

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

        Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/dvn/.config`).

    3.  Fcitx5 Settings Directory:

        Current fcitx5 settings directory is `~/.config/fcitx5` (`/home/dvn/.config/fcitx5`).

5.  Current user:

    The script is run as dvn (1000).

# Fcitx State:
1.  executable:

    Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

    Fcitx version: `5.0.23`

3.  process:

    Found 2 fcitx5 processes:

        18573 fcitx5
        18577 fcitx5-plasma-t

4.  `fcitx5-remote`:

    `fcitx5-remote` works properly.

5.  DBus interface:

    Using `dbus-send` to check dbus.

    Owner of DBus name `org.fcitx.Fcitx5` is `:1.560`.

    PID of DBus name `org.fcitx.Fcitx5` owner is `18573`.

    Debug information from dbus:

           Group [x11::0] has 37 InputContext(s)
          IC [5ea9465f98de403aabbf02bab36d944c] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [0fc01cb873e34558ab652e29d10e5913] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [c6198401b3f1416f8b7774336a9ba87c] program:firefox frontend:dbus cap:6000000072 focus:0
          IC [184c53d4009c4b39aa273a9d04a7d018] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [9922f96b68764f9db7d8b39e6d3a4cfc] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [05abc6e42859428e9b38041adc759156] program:dolphin frontend:dbus cap:16000800072 focus:0
          IC [5535fdc58660477ba410da053e2f3ec2] program:ksysguard frontend:dbus cap:16000800072 focus:0
          IC [83723287462e40b089337a43ec4ebab7] program:firefox frontend:dbus cap:6000000072 focus:0
          IC [ab4c6940631c451aae09c0f3a697f89e] program:ksysguard frontend:dbus cap:16000800072 focus:0
          IC [d2f0113061e748fe8db07e21da33cbad] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [339556cd226540259aaf22789bcabbe1] program:konsole frontend:dbus cap:16000820872 focus:0
          IC [9ed2eeda1a584765a4f16b65a67a20d6] program:kwrite frontend:dbus cap:0 focus:0
          IC [56214c4791c749e1bb6fe1aec43994e0] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [e761994f106540d3be88dbbcf0ffa98b] program:kwrite frontend:dbus cap:0 focus:0
          IC [ba5e3093008c439fa684334407a4ad42] program:plasmashell frontend:dbus cap:0 focus:0
          IC [1c526b06e0da4e2ea870cb05fa46a08f] program:konsole frontend:dbus cap:0 focus:0
          IC [c7e791f6853d494d9bbdd9d07f004727] program:dolphin frontend:dbus cap:0 focus:0
          IC [76f47a7ce49f41188d7a76cf497bceb9] program:plasmashell frontend:dbus cap:0 focus:0
          IC [511dfc5434b74486ad4c6d4611c1f8c6] program:plasmashell frontend:dbus cap:0 focus:0
          IC [9c149edead194966912f372019c05d78] program:dolphin frontend:dbus cap:0 focus:0
          IC [a1405b554dce4894ae426cdf233398ca] program:plasmashell frontend:dbus cap:0 focus:0
          IC [4db1a6ee89e942269fd1ecb160c46d3a] program:firefox frontend:dbus cap:6000000032 focus:0
          IC [eea3906acc974dac96d14f4806896204] program:plasmashell frontend:dbus cap:0 focus:0
          IC [c324bf2812c94656ab66f21f28fef4e8] program:plasmashell frontend:dbus cap:0 focus:0
          IC [6c48eab7e37241fc84dd655f14ac582e] program:ksysguard frontend:dbus cap:0 focus:0
          IC [b93885058b074b8dbcaa17a435c656aa] program:dolphin frontend:dbus cap:0 focus:0
          IC [a46bc80f014e4ad2a5a73cff72fc1428] program:ksysguard frontend:dbus cap:0 focus:0
          IC [1d6d14723b99479e8be2927991eade96] program:konsole frontend:dbus cap:0 focus:0
          IC [8ef64147c1af46699bc04ebb039db9d3] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [e9c981bef60644e995bde3972bb3cf12] program:ksysguard frontend:dbus cap:0 focus:0
          IC [87991fd86d914651b9262e6a55305223] program:plasmashell frontend:dbus cap:0 focus:0
          IC [4400a750bfb64eee9a67fbc8841c9351] program:ksysguard frontend:dbus cap:0 focus:0
          IC [e14a54cc46324bbf8e43fdde86dd8bf9] program:plasmashell frontend:dbus cap:0 focus:0
          IC [1164e38279c4496c91859655a06d7fea] program:kwrite frontend:dbus cap:16000800072 focus:0
          IC [bf20f9693a1045dcaa5dea8d42651c90] program:dolphin frontend:dbus cap:6000820872 focus:1
          IC [deed1fb31a2d4becb61062dd9ffb4912] program:plasmashell frontend:dbus cap:16000820072 focus:0
          IC [cc7514af454d4851867cd13c99a3e9b7] program:dolphin frontend:dbus cap:0 focus:0
        Input Context without group

# Fcitx Configure UI:
1.  Config Tool Wrapper:

    Found fcitx5-configtool at `/usr/bin/fcitx5-configtool`.

2.  Config GUI for qt:

    Found `fcitx5-config-qt` at `/usr/bin/fcitx5-config-qt`.

3.  Config GUI for kde:

    Found fcitx5 kcm module.

        kcm_fcitx5                     - Configure Input Method

# Frontends setup:
## Xim:
1.  `${XMODIFIERS}`:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    Xim Server Name from Environment variable is fcitx.

2.  XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

2.  qt5 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

3.  Qt IM module files:

    Found unknown fcitx qt module: `/usr/lib/qt/plugins/kcms/kcm_fcitx5.so`.
    Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found fcitx5 qt5 module: `/usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so`.
    Found fcitx5 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.

    Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    **Cannot find fcitx5 input method module for Qt4.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

2.  `gtk-query-immodules`:

    1.  gtk 2:

        Found `gtk-query-immodules` for gtk `2.24.33` at `/usr/bin/gtk-query-immodules-2.0`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        Found `gtk-query-immodules` for gtk `3.24.37` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.37

        Found fcitx5 im modules for gtk `3.24.37`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

3.  Gtk IM module cache:

    1.  gtk 2:

        Found immodules cache for gtk `2.24.33` at `/usr/lib/gtk-2.0/2.10.0/immodules.cache`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

    2.  gtk 3:

        Found immodules cache for gtk `3.24.37` at `/usr/lib/gtk-3.0/3.0.0/immodules.cache`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.37

        Found fcitx5 im modules for gtk `3.24.37`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*" 

    3.  gtk 4:

        **Cannot find immodules cache for gtk 4**

        **Cannot find fcitx5 im module for gtk 4 in cache.**

4.  Gtk IM module files:

    1.  gtk 2:

        All found Gtk 2 immodule files exist.

    2.  gtk 3:

        All found Gtk 3 immodule files exist.

    3.  gtk 4:

        All found Gtk 4 immodule files exist.

# Configuration:
## Fcitx Addons:
1.  Addon Config Dir:

    Found fcitx5 addon config directory: `/usr/share/fcitx5/addon`.

2.  Addon List:

    1.  Found 20 enabled addons:

            Classic User Interface 5.0.23
            Clipboard 5.0.23
            DBus 5.0.23
            DBus Frontend 5.0.23
            Emoji 5.0.23
            Fcitx4 Frontend 5.0.23
            IBus Frontend 5.0.23
            Input method selector 5.0.23
            Keyboard 5.0.23
            KDE Input Method Panel 5.0.23
            Mozc 
            Status Notifier 5.0.23
            Notification 5.0.23
            Quick Phrase 5.0.23
            Spell 5.0.23
            Unicode 5.0.23
            Wayland 5.0.23
            Wayland Input method frontend 5.0.23
            XCB 5.0.23
            X Input Method Frontend 5.0.23

    2.  Found 0 disabled addons:

3.  Addon Libraries:

    All libraries for all addons are found.

4.  User Interface:

    Found 2 enabled user interface addons:

        Classic User Interface
        KDE Input Method Panel

## Input Methods:
1.  `/home/dvn/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name="Group 1"
        # Layout
        Default Layout=us
        # Default Input Method
        DefaultIM=mozc

        [Groups/0/Items/0]
        # Name
        Name=keyboard-us
        # Layout
        Layout=

        [Groups/0/Items/1]
        # Name
        Name=mozc
        # Layout
        Layout=

        [GroupOrder]
        0="Group 1"

# Log:
1.  `date`:

        Tue May 16 03:55:45 PM +0000 2023

2.  `/home/dvn/.config/fcitx5/crash.log`:

        =========================
        Fcitx 5.0.23 -- Get Signal No.: 11
        Date: try "date -d @1682503365" if you are using GNU date ***
        ProcessID: 3819
        /usr/bin/fcitx5(+0x12e9c)[0x560b48761e9c]
        /usr/lib/libc.so.6(+0x38f50)[0x7ffb0e051f50]
        /usr/lib/libFcitx5Utils.so.2(+0x3a9b5)[0x7ffb0e58c9b5]
        /usr/lib/libFcitx5Utils.so.2(+0x4d1e3)[0x7ffb0e59f1e3]
        /usr/lib/libevent_core-2.1.so.7(+0x1ec35)[0x7ffb0e48ec35]
        /usr/lib/libevent_core-2.1.so.7(event_base_loop+0x4ff)[0x7ffb0e49039f]
        /usr/lib/libFcitx5Utils.so.2(_ZN5fcitx9EventLoop4execEv+0x3f)[0x7ffb0e59b6df]
        /usr/lib/libFcitx5Core.so.7(_ZN5fcitx8Instance4execEv+0x57)[0x7ffb0e665217]
        /usr/bin/fcitx5(+0x110a0)[0x560b487600a0]
        /usr/lib/libc.so.6(+0x23790)[0x7ffb0e03c790]
        /usr/lib/libc.so.6(__libc_start_main+0x8a)[0x7ffb0e03c84a]
        /usr/bin/fcitx5(+0x12475)[0x560b48761475]

**Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.**

**Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.**

Additional context This issue does not occur when using Wayland. In addition, using git bisect, I've managed to narrow the problem down to commit 96a6264, which is related to the Disable capability flag, so I'm not sure if this is a problem with fcitx5 or KDE, though I've decided to report it here first.

wengxt commented 1 year ago

I believe your issue with mozc is fixed with https://github.com/fcitx/mozc/commit/eeb9ab13e65d430c1841e9328d2c6698ad1c44d6,

https://github.com/fcitx/mozc/issues/29 please ask your distro to upgrade mozc (I guess it's pulling from arch, so maybe wait for arch upgrade or build fcitx5-mozc yourself).