GithubHelp home page GithubHelp logo

fcitx5-gtk's Introduction

Fcitx 4 is under maintainence Mode now, so no new issue and PR should be created.

Please give fcitx 5 a try if possible. If you're experiencing problem, you can
reach out mail list (fcitx[at]googlegroups.com) or IRC (fcitx[at]freenode) for help.

Please read http://fcitx-im.org for further help.

See COPYING and COPYING.LIBS for License information.

fcitx5-gtk's People

Contributors

concatime avatar etrnls avatar felixonmars avatar marguerite avatar mcatanzaro avatar nntae avatar s1eke avatar trofi avatar wengxt avatar xingwozhonghua126 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fcitx5-gtk's Issues

Shared client object

imcontext object is actually created for every text widget and some application even leaks widget (specifically, kicad, or virt-manager). We might want to take Qt's approach to manage the client object in a per-surface way.

linuxmint 编译安装后,无法找到 gtk 2 的 `gtk-query-immodules`

编译安装完后,使用fcitx5-diagnose提示无法找到 gtk 2 的 gtk-query-immodules
已执行过

sudo GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-3.0 /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 --update-cache

sudo GTK_PATH=/usr/lib/x86_64-linux-gnu/gtk-2.0 /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 --update-cache
~$ fcitx5-diagnose
# 系统信息:
1.  `uname -a`:

        Linux dh-ThinkPad-X240 5.4.0-92-generic #103-Ubuntu SMP Fri Nov 26 16:13:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

2.  `lsb_release -a`:

        No LSB modules are available.
        Distributor ID:	Linuxmint
        Description:	Linux Mint 20.3
        Release:	20.3
        Codename:	una

3.  `lsb_release -d`:

        Description:	Linux Mint 20.3

4.  `/etc/lsb-release`:

        DISTRIB_ID=LinuxMint
        DISTRIB_RELEASE=20.3
        DISTRIB_CODENAME=una
        DISTRIB_DESCRIPTION="Linux Mint 20.3 Una"

5.  `/etc/os-release`:

        NAME="Linux Mint"
        VERSION="20.3 (Una)"
        ID=linuxmint
        ID_LIKE=ubuntu
        PRETTY_NAME="Linux Mint 20.3"
        VERSION_ID="20.3"
        HOME_URL="https://www.linuxmint.com/"
        SUPPORT_URL="https://forums.linuxmint.com/"
        BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
        PRIVACY_POLICY_URL="https://www.linuxmint.com/"
        VERSION_CODENAME=una
        UBUNTU_CODENAME=focal

6.  桌面环境:

    桌面环境为 `mate`。

7.  XDG 会话类型:

        XDG_SESSION_TYPE='x11'

8.  Bash 版本:

        BASH_VERSION='5.0.17(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0'


        WAYLAND_DISPLAY=''

2.  键盘布局:

    1.  `setxkbmap`:

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

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "cn", "", "terminate:ctrl_alt_bksp,grp:win_space_toggle"

3.  Locale:

    1.  全部可用 locale:

            C
            C.UTF-8
            en_AG
            en_AG.utf8
            en_AU.utf8
            en_BW.utf8
            en_CA.utf8
            en_DK.utf8
            en_GB.utf8
            en_HK.utf8
            en_IE.utf8
            en_IL
            en_IL.utf8
            en_IN
            en_IN.utf8
            en_NG
            en_NG.utf8
            en_NZ.utf8
            en_PH.utf8
            en_SG.utf8
            en_US.utf8
            en_ZA.utf8
            en_ZM
            en_ZM.utf8
            en_ZW.utf8
            POSIX
            zh_CN.utf8
            zh_SG.utf8

    2.  当前 locale:

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

4.  目录:

    1.  主目录:

            /home/dh

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/dh/.config`)。

    3.  Fcitx5 设置目录:

        当前 fcitx5 设置目录是 `~/.config/fcitx5` (`/home/dh/.config/fcitx5`)。

5.  当前用户:

    脚本作为 dh (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx5` 找到了 fcitx5。

2.  版本:

    Fcitx 版本: `5.0.12`

3.  进程:

    找到了 1 个 fcitx5 进程:

           2078 fcitx5

4.  `fcitx5-remote`:

    `fcitx5-remote` 工作正常。

5.  DBus 界面:

    使用 `dbus-send` 来检查 dbus。

    DBus 名称 `org.fcitx.Fcitx5` 的所有者是 `:1.326`。

    DBus 名称 `org.fcitx.Fcitx5` 的 PID 所有者是 `2078`。

    来自 dbus 的调试信息:

           Group [x11::0] has 38 InputContext(s)
          IC [c9fd54b9056f45e887cda444bc34736c] program:guake frontend:fcitx4 cap:0 focus:0
          IC [0357c4971da648c3ac073f41b4730fe9] program:guake frontend:fcitx4 cap:0 focus:0
          IC [e254e88558eb4b929f78e8cdf72365e0] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [d4fa6583ae4f41fe90970bfb0e366557] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [2edaaa4131f34ac08a633806d7c85412] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [42f28b70aaac4f5683a9008a3a3cd717] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [68f3208aa69e4fe29762b6df61f99a55] program:msedge frontend:fcitx4 cap:0 focus:0
          IC [329c2f5f6e614106ab01c66b3fbb42fc] program:msedge frontend:fcitx4 cap:0 focus:0
          IC [d99695b62cfc4d2caf093b061fe70f23] program:guake frontend:fcitx4 cap:0 focus:0
          IC [2577baffef0e40c88b0a7431ac258484] program:hexchat frontend:fcitx4 cap:40 focus:0
          IC [e4326a24e18f4461b8e9fa9efbedd000] program:brisk-menu frontend:fcitx4 cap:40 focus:0
          IC [18eee12943d64279b9728ef40b5f5865] program:caja frontend:fcitx4 cap:0 focus:0
          IC [a260ffe45b80406292296d86796f1eba] program:hexchat frontend:fcitx4 cap:0 focus:0
          IC [d258d607e1264d52acab2dbd7d86ea16] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [513d02bcb6ef4214b3d78d5c76b1c686] program:HTYFB frontend:fcitx4 cap:0 focus:0
          IC [184923bd6f044c2ca391f18800003249] program:hexchat frontend:fcitx4 cap:0 focus:0
          IC [3b0d7ec352594855b573ed0d8aabde66] program:HTYFB frontend:fcitx4 cap:0 focus:0
          IC [5719c496b32441668606442aecdc56b8] program:caja frontend:fcitx4 cap:40 focus:0
          IC [f16f9bc5ca6441cfbdf842d35eb22c25] program:polkit-mate-aut frontend:fcitx4 cap:0 focus:0
          IC [047adb6d3bd946de83571bc46a3c2605] program:hexchat frontend:fcitx4 cap:0 focus:0
          IC [cc10d4579e304ceab563442149bdbd3a] program:clock-applet frontend:fcitx4 cap:0 focus:0
          IC [2ffa47ca8acf45db95b7507415f732b1] program:caja frontend:fcitx4 cap:0 focus:0
          IC [cff837a913644a82952e0ec602a4be83] program:clock-applet frontend:fcitx4 cap:0 focus:0
          IC [1efd5cae4af64b75a8f6b14f723d223f] program:hexchat frontend:fcitx4 cap:0 focus:0
          IC [e7a53e6c03584a7a87c46a2ab4335a9d] program:guake frontend:fcitx4 cap:0 focus:0
          IC [de2ef9b716c9469c9dfa5082f085b02f] program:notification-ar frontend:fcitx4 cap:0 focus:0
          IC [9544e3552b374f75bbaaa39a420e99f9] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [4bf54ac382d542d7b44bc84462ff56c2] program:guake frontend:fcitx4 cap:0 focus:1
          IC [032aa7af6ffe4ccb90ed051cc0b02b6a] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [2b316815727c474393925d030b675efe] program:clock-applet frontend:fcitx4 cap:0 focus:0
          IC [89e77cd8ec994edb98509b6208880dcd] program:guake frontend:fcitx4 cap:0 focus:0
          IC [509ad890e48c411ea9a5702b2848af0c] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [3fc4c8f6acde4db7b9bb867434381daf] program:clock-applet frontend:fcitx4 cap:0 focus:0
          IC [c64fabc0815a4ad5a88ab49479f6211d] program:caja frontend:fcitx4 cap:0 focus:0
          IC [8c4b3392ed9e4c009f68cf98854ff13c] program:clock-applet frontend:fcitx4 cap:0 focus:0
          IC [4759eb63b21c4dd58cebd1c1ae353de5] program:sublime_text frontend:fcitx4 cap:0 focus:0
          IC [56f406f8a56947e0a6793a7d815b1f9f] program:brisk-menu frontend:fcitx4 cap:40 focus:0
          IC [95f4bc6186a24586a52a6979bf488f84] program:sublime_text frontend:fcitx4 cap:0 focus:0
        Input Context without group

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx5-configtool` 找到了 fcitx5-configtool。

2.  Qt 的配置界面:

    在 `/usr/bin/fcitx5-config-qt` 找到了 `fcitx5-config-qt`。

3.  KDE 的配置界面:

    **`kcmshell5` 未找到.**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    环境变量 XMODIFIERS 已经正确地设为了“@im=fcitx”。
    从环境变量中获取的 Xim 服务名称为 fcitx.

2.  根窗口上的 XIM_SERVERS:

    Xim 服务的名称与环境变量中设置的相同。

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

    环境变量 QT_IM_MODULE 已经正确地设为了“fcitx”。

2.  qt5 - `${QT_IM_MODULE}`:

    环境变量 QT_IM_MODULE 已经正确地设为了“fcitx”。

3.  Qt 输入法模块文件:

    找到了未知的 fcitx qt 模块:`/lib/x86_64-linux-gnu/fcitx/qt/libfcitx-rime-config-gui.so`。
    找到了未知的 fcitx qt 模块:`/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`。
    找到了 fcitx5 的 qt5 输入法模块:`/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`。
    找到了未知的 fcitx qt 模块:`/lib/x86_64-linux-gnu/qt5/plugins/kcms/kcm_fcitx5.so`。
    找到了 fcitx5 qt5 模块:`/lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx-quickphrase-editor5.so`。
    **无法找到 Qt4 的 fcitx5 输入法模块。**

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

    环境变量 GTK_IM_MODULE 已经正确地设为了“fcitx”。

2.  `gtk-query-immodules`:

    1.  gtk 2:

        **无法找到 gtk 2 的 `gtk-query-immodules`。**

        **无法找到 gtk 2 的 fcitx5 输入法模块。**

    2.  gtk 3:

        **无法找到 gtk 3 的 `gtk-query-immodules`。**

        **无法找到 gtk 3 的 fcitx5 输入法模块。**

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.32` 的输入法模块缓存。
        版本行:

            # Created by /usr/lib/x86_64-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.32

        已找到 gtk `2.24.32` 的 fcitx5 输入法模块。

            "/usr/lib/x86_64-linux-gnu/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:*" 
            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" 
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/local/locale" "ja:ko:zh:*" 
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/local/locale" "ja:ko:zh:*" 

        在 `/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.32` 的输入法模块缓存。
        版本行:

            # Created by /usr/lib/i386-linux-gnu/libgtk2.0-0/gtk-query-immodules-2.0 from gtk+-2.24.32

        **无法输入法模块缓存 `/lib/i386-linux-gnu/gtk-2.0/2.10.0/immodules.cache` 中找到 fcitx5**

    2.  gtk 3:

        在 `/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.24.20` 的输入法模块缓存。
        版本行:

            # Created by /usr/lib/x86_64-linux-gnu/libgtk-3-0/gtk-query-immodules-3.0 from gtk+-3.24.20

        已找到 gtk `3.24.20` 的 fcitx5 输入法模块。

            "/usr/lib/x86_64-linux-gnu/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:

        **无法找到 gtk 4 的输入法模块缓存**

        **无法在缓存中找到 gtk 4 的 fcitx5 输入法模块。**

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在。

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在。

    3.  gtk 4:

        找到的全部 Gtk 4 输入法模块文件均存在。

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx5 的插件配置目录:`/usr/share/fcitx5/addon`。

2.  插件列表:

    1.  找到了 24 个已启用的插件:

            Simplified and Traditional Chinese Translation 5.0.10
            Classic User Inteface 5.0.12
            Clipboard 5.0.12
            Cloud Pinyin 5.0.10
            DBus 5.0.12
            DBus Frontend 5.0.12
            Fcitx4 Frontend 5.0.12
            Full width character 5.0.10
            IBus Frontend 5.0.12
            Input method selector 5.0.12
            Keyboard 5.0.12
            Status Notifier 5.0.12
            Notification 5.0.12
            Pinyin 5.0.10
            Extra Pinyin functionality 5.0.10
            Punctuation 5.0.10
            Rime 5.0.10
            Spell 5.0.12
            Table 5.0.10
            Unicode 5.0.12
            Wayland 5.0.12
            Wayland Input method frontend 5.0.12
            XCB 5.0.12
            X Input Method Frontend 5.0.12

    2.  找到了 1 个被禁用的插件:

            KDE Input Method Panel 5.0.12

3.  插件库: 

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 1 个已启用的用户界面插件:

        Classic User Inteface

## 输入法:
1.  `/home/dh/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name=默认
        # Layout
        Default Layout=cn
        # Default Input Method
        DefaultIM=rime

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

        [Groups/0/Items/1]
        # Name
        Name=rime
        # Layout
        Layout=cn

        [Groups/0/Items/2]
        # Name
        Name=shuangpin
        # Layout
        Layout=

        [Groups/0/Items/3]
        # Name
        Name=pinyin
        # Layout
        Layout=cn

        [GroupOrder]
        0=默认

# 日志:
1.  `date`:

        2022年 01月 09日 星期日 23:24:51 CST

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

        =========================
        Fcitx 5.0.12 -- Get Signal No.: 6
        Date: try "date -d @1641663612" if you are using GNU date ***
        ProcessID: 4048
        /usr/bin/fcitx5(+0x2e8e4)[0x55ce875228e4]
        /lib/x86_64-linux-gnu/libc.so.6(+0x46210)[0x7f2ef3e81210]
        /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7f2ef3e8118b]
        /lib/x86_64-linux-gnu/libc.so.6(abort+0x12b)[0x7f2ef3e60859]
        /lib/x86_64-linux-gnu/libFcitx5Utils.so.2(+0x1543d7)[0x7f2ef43c03d7]
        /lib/x86_64-linux-gnu/libsystemd.so.0(+0x3f6aa)[0x7f2ef3d556aa]
        /lib/x86_64-linux-gnu/libsystemd.so.0(sd_event_dispatch+0x111)[0x7f2ef3d561b1]
        /lib/x86_64-linux-gnu/libsystemd.so.0(sd_event_run+0x98)[0x7f2ef3d59be8]
        /lib/x86_64-linux-gnu/libsystemd.so.0(sd_event_loop+0x5f)[0x7f2ef3d59e0f]
        /lib/x86_64-linux-gnu/libFcitx5Utils.so.2(_ZN5fcitx9EventLoop4execEv+0x30)[0x7f2ef43bfc68]
        /lib/x86_64-linux-gnu/libFcitx5Core.so.7(_ZN5fcitx8Instance4execEv+0x7f)[0x7f2ef46ac647]
        /usr/bin/fcitx5(+0x2a710)[0x55ce8751e710]
        /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7f2ef3e620b3]
        /usr/bin/fcitx5(+0x29fbe)[0x55ce8751dfbe]

**警告:fcitx5-diagnose 的输出可能包含敏感信息,包括发行版名称,内核版本,正在运行的程序名称等。**

**尽管这些信息对于开发者诊断问题有帮助,请在公开发送到在线网站前检查并且根据需要移除的对应信息。**

搜了一些方法,也无效。

对比了自己编译安装的到系统里的fcitx5-gtk文件和Archlinux上打包的fcitx5-gtk的Package Contents,发现二者编译的文件是一样的,但是文件存放的目录不一样。

自己编译过程,及安装到系统里的fcitx5-gtk文件及安装目录如下:

~/fcitx5-gtk$ mkdir build && cd $_ && cmake cmake -DENABLE_GTK4_IM_MODULE=Off .. && make -j`nproc` && sudo make install
-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found XKBCommon_XKBCommon: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found version "0.10.0") 
-- Found XKBCommon_X11: /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so (found version "0.10.0") 
-- Found XKBCommon: /usr/lib/x86_64-linux-gnu/libxkbcommon.so;/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so (found version "0.10.0")  
-- Checking for module 'glib-2.0>=2.56'
--   Found glib-2.0, version 2.64.6
-- Checking for module 'gio-2.0'
--   Found gio-2.0, version 2.64.6
-- Checking for module 'gobject-2.0'
--   Found gobject-2.0, version 2.64.6
-- Checking for module 'gobject-introspection-1.0'
--   Found gobject-introspection-1.0, version 1.64.1
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.32
-- Checking for module 'gdk-2.0'
--   Found gdk-2.0, version 2.24.32
-- Checking for module 'gdk-x11-2.0'
--   Found gdk-x11-2.0, version 2.24.32
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.20
-- Checking for module 'gdk-3.0'
--   Found gdk-3.0, version 3.24.20
-- Checking for module 'gdk-x11-3.0'
--   Found gdk-x11-3.0, version 3.24.20
-- The following OPTIONAL packages have been found:

 * XKBCommon, Keyboard handling library using XKB data, <http://xkbcommon.org>

-- The following REQUIRED packages have been found:

 * ECM
 * X11

-- Configuring done
-- Generating done
-- Build files have been written to: /home/deedd/fcitx5-gtk/build
[ 11%] Generating marshall.h
[ 11%] Generating marshall.c
INFO: Reading /home/deedd/fcitx5-gtk/gtk-common/marshall.list...
INFO: Reading /home/deedd/fcitx5-gtk/gtk-common/marshall.list...
WARNING: The token "BOOL" is deprecated; use "BOOLEAN" instead
WARNING: The token "BOOL" is deprecated; use "BOOLEAN" instead
WARNING: The token "BOOL" is deprecated; use "BOOLEAN" instead
WARNING: The token "BOOL" is deprecated; use "BOOLEAN" instead
Scanning dependencies of target Fcitx5GClient
[ 16%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/fcitxgwatcher.c.o
[ 27%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/fcitxgclient.c.o
[ 27%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/marshall.c.o
[ 33%] Linking C shared library libFcitx5GClient.so
[ 33%] Built target Fcitx5GClient
Scanning dependencies of target im-fcitx5
Scanning dependencies of target gobject_introspection_compile_target_1
Scanning dependencies of target im-fcitx5-gtk3
[ 38%] Generating FcitxG-1.0.gir
[ 44%] Building C object gtk2/CMakeFiles/im-fcitx5.dir/fcitxim.c.o
[ 50%] Building CXX object gtk2/CMakeFiles/im-fcitx5.dir/fcitximcontext.cpp.o
[ 55%] Building C object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/fcitxim.c.o
[ 61%] Building CXX object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/fcitximcontext.cpp.o
[ 66%] Building CXX object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/fcitxtheme.cpp.o
[ 72%] Generating FcitxG-1.0.typelib
[ 77%] Linking CXX shared module im-fcitx5.so
[ 77%] Built target gobject_introspection_compile_target_1
[ 77%] Built target im-fcitx5
[ 83%] Building CXX object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/utils.cpp.o
[ 88%] Building CXX object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/inputwindow.cpp.o
[ 94%] Building CXX object gtk3/CMakeFiles/im-fcitx5-gtk3.dir/gtk3inputwindow.cpp.o
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp: In function ‘void fcitx_im_context_class_init(FcitxIMContextClass*, gpointer)’:
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:352:72: warning: ‘guint gtk_key_snooper_install(GtkKeySnoopFunc, gpointer)’ is deprecated [-Wdeprecated-declarations]
  352 |         _key_snooper_id = gtk_key_snooper_install(_key_snooper_cb, NULL);
      |                                                                        ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:143,
                 from /home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:19:
/usr/include/gtk-3.0/gtk/gtkmain.h:185:12: note: declared here
  185 | guint      gtk_key_snooper_install (GtkKeySnoopFunc snooper,
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:352:72: warning: ‘guint gtk_key_snooper_install(GtkKeySnoopFunc, gpointer)’ is deprecated [-Wdeprecated-declarations]
  352 |         _key_snooper_id = gtk_key_snooper_install(_key_snooper_cb, NULL);
      |                                                                        ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:143,
                 from /home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:19:
/usr/include/gtk-3.0/gtk/gtkmain.h:185:12: note: declared here
  185 | guint      gtk_key_snooper_install (GtkKeySnoopFunc snooper,
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp: In function ‘void fcitx_im_context_class_fini(FcitxIMContextClass*, gpointer)’:
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:357:47: warning: ‘void gtk_key_snooper_remove(guint)’ is deprecated [-Wdeprecated-declarations]
  357 |         gtk_key_snooper_remove(_key_snooper_id);
      |                                               ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:143,
                 from /home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:19:
/usr/include/gtk-3.0/gtk/gtkmain.h:188:12: note: declared here
  188 | void       gtk_key_snooper_remove  (guint           snooper_handler_id);
      |            ^~~~~~~~~~~~~~~~~~~~~~
/home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:357:47: warning: ‘void gtk_key_snooper_remove(guint)’ is deprecated [-Wdeprecated-declarations]
  357 |         gtk_key_snooper_remove(_key_snooper_id);
      |                                               ^
In file included from /usr/include/gtk-3.0/gtk/gtk.h:143,
                 from /home/deedd/fcitx5-gtk/gtk3/fcitximcontext.cpp:19:
/usr/include/gtk-3.0/gtk/gtkmain.h:188:12: note: declared here
  188 | void       gtk_key_snooper_remove  (guint           snooper_handler_id);
      |            ^~~~~~~~~~~~~~~~~~~~~~
[100%] Linking CXX shared module im-fcitx5.so
[100%] Built target im-fcitx5-gtk3
[sudo] dh 的密码:       
[ 33%] Built target Fcitx5GClient
[ 44%] Built target gobject_introspection_compile_target_1
[ 61%] Built target im-fcitx5
[100%] Built target im-fcitx5-gtk3
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/libFcitx5GClient.so.5.0.11
-- Installing: /usr/local/lib/libFcitx5GClient.so.2
-- Installing: /usr/local/lib/libFcitx5GClient.so
-- Installing: /usr/local/lib/pkgconfig/Fcitx5GClient.pc
-- Installing: /usr/local/include/Fcitx5/GClient/fcitx-gclient/fcitxgclient.h
-- Installing: /usr/local/include/Fcitx5/GClient/fcitx-gclient/fcitxgwatcher.h
-- Installing: /usr/local/lib/cmake/Fcitx5GClient/Fcitx5GClientTargets.cmake
-- Installing: /usr/local/lib/cmake/Fcitx5GClient/Fcitx5GClientTargets-noconfig.cmake
-- Installing: /usr/local/lib/cmake/Fcitx5GClient/Fcitx5GClientConfig.cmake
-- Installing: /usr/local/lib/cmake/Fcitx5GClient/Fcitx5GClientConfigVersion.cmake
-- Installing: /usr/share/gir-1.0/FcitxG-1.0.gir
-- Installing: /usr/lib/x86_64-linux-gnu/girepository-1.0/FcitxG-1.0.typelib
-- Installing: /usr/local/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so
-- Set runtime path of "/usr/local/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so" to "/usr/local/lib"
-- Installing: /usr/local/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so
-- Set runtime path of "/usr/local/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so" to "/usr/local/lib"

Archlinux上打包的fcitx5-gtk的Package Contents如下:

usr/
usr/include/
usr/include/Fcitx5/
usr/include/Fcitx5/GClient/
usr/include/Fcitx5/GClient/fcitx-gclient/
usr/include/Fcitx5/GClient/fcitx-gclient/fcitxgclient.h
usr/include/Fcitx5/GClient/fcitx-gclient/fcitxgwatcher.h
usr/lib/
usr/lib/cmake/
usr/lib/cmake/Fcitx5GClient/
usr/lib/cmake/Fcitx5GClient/Fcitx5GClientConfig.cmake
usr/lib/cmake/Fcitx5GClient/Fcitx5GClientConfigVersion.cmake
usr/lib/cmake/Fcitx5GClient/Fcitx5GClientTargets-noconfig.cmake
usr/lib/cmake/Fcitx5GClient/Fcitx5GClientTargets.cmake
usr/lib/girepository-1.0/
usr/lib/girepository-1.0/FcitxG-1.0.typelib
usr/lib/gtk-2.0/
usr/lib/gtk-2.0/2.10.0/
usr/lib/gtk-2.0/2.10.0/immodules/
usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so
usr/lib/gtk-3.0/
usr/lib/gtk-3.0/3.0.0/
usr/lib/gtk-3.0/3.0.0/immodules/
usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so
usr/lib/gtk-4.0/
usr/lib/gtk-4.0/4.0.0/
usr/lib/gtk-4.0/4.0.0/immodules/
usr/lib/gtk-4.0/4.0.0/immodules/libim-fcitx5.so
usr/lib/libFcitx5GClient.so
usr/lib/libFcitx5GClient.so.2
usr/lib/libFcitx5GClient.so.5.0.10
usr/lib/pkgconfig/
usr/lib/pkgconfig/Fcitx5GClient.pc
usr/share/
usr/share/gir-1.0/
usr/share/gir-1.0/FcitxG-1.0.gir

No longer follows cursor

With 4e0e254 things work fine, but with bbc296a, some applications place the input window at the left top corner instead.

Wayland, Wayfire.

Affected applications:

  • firefox and firefox-nightly
  • gvim (with my patches)
  • gtk3-demos: everything below "Text View"

Unaffected applications:

  • thunar
  • gnome-font-viewer
  • xfce4-appfinder
  • GTK file chooser dialog
  • gtk3-demos: everything below "Entry"

It seems that it depends on what widget is used.

Fcitx 5 crashes Gimp 2.99 on NixOS

NixOS/nixpkgs#260076 has specific details about how I encountered the issue, please refer to it

This is somehow related to immodules.cache files, so I propose the following reproduction steps for other distros

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

to any file (hopefully /usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so is the correct path)

  1. export GTK_IM_MODULE_FILE=<path to file>

  2. Launch Gimp 2.99 and try using Fcitx5 in the text tool's font selection textbox or font size selection textbox (specifically, in the floating window that opens above the image when writing text). It's usually packaged as gimp-devel.

Steps 1 and 2 aren't necessary if your OS manages immodules.cache correctly, but can be useful for testing.

GTK4 w/o X11

Hi, looking at CMakeLists.txt, it seems that X11 is a hard dependency. Can you provide a way to compile GTK4 feature w/o X11? Aka with wayland instead? That would be awesome.
Thank you.

Does not work if 32-bit gtk2 version is installed

At least on Arch Linux, if you have both gtk2 and lib32-gtk2 installed, it refuses to work in at least Discord.

fcitx5-diagnose kept insisting that the GTK2 module was not found, while gtk-query-immodules-2.0 listed it. Eventually I noticed that it wasn't actually using gtk-query-immodules-2.0, but gtk-query-immodules-2.0-33, which is a 32-bit executable and appears to be the same thing used for the 32 bit version of GTK2.
After uninstalling lib32-gtk2, I could switch input method in Discord and finally type in Japanese again.

[GTK3 only] Gtk3InputWindow::Init() does not correctly setup candidate window's GdkScreen which can crash gdk_window_set_transient_for()

Currently Gtk3InputWindow::Init() use default constructor gtk_window_new() to create the candidate window and directly pass it to gdk_window_set_transient_for(gdkWindow, parent_).

However, parent_ can somehow use a non-default GdkScreen, for example by using gtk_window_set_screen() or using gdk_wayland_window_set_transient_for_exported(). This can make gdk_window_set_transient_for() crashes on GDK_BACKEND=wayland with the following assertion message:

xdg-desktop-portal-gtk: Gdk:ERROR:../gdk/wayland/gdkwindow-wayland.c:4121:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))
xdg-desktop-portal-gtk: Bail out! Gdk:ERROR:../gdk/wayland/gdkwindow-wayland.c:4121:gdk_wayland_window_set_transient_for: assertion failed: (parent == NULL || gdk_window_get_display (window) == gdk_window_get_display (parent))

On GDK_BACKEND=x11 GTK use XSetTransientForHint() but ignore it's failure, so errors do not lead to a crash, but transition window can not succeed anyway.

Regression (build failure) with v5.0.17

$ git clone https://github.com/fcitx/fcitx5-gtk.git
正克隆到 'fcitx5-gtk'...
remote: Enumerating objects: 724, done.
remote: Counting objects: 100% (197/197), done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 724 (delta 163), reused 150 (delta 123), pack-reused 527
接收对象中: 100% (724/724), 303.70 KiB | 6.07 MiB/s, 完成.
处理 delta 中: 100% (496/496), 完成.
$ cd fcitx5-gtk
$ git show --oneline HEAD | tee    
3a40b74 bump version
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 183aa01..2dbf7d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.6)
-project(fcitx5-gtk VERSION 5.0.16)
+project(fcitx5-gtk VERSION 5.0.17)
 
 find_package(ECM REQUIRED 1.0.0)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
$ cmake .
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") 
CMake Warning (dev) at /usr/share/ECM/modules/ECMFindModuleHelpers.cmake:113 (message):
  Your project should require at least CMake 3.16.0 to use
  FindXKBCommon.cmake
Call Stack (most recent call first):
  cmake/FindXKBCommon.cmake:4 (ecm_find_package_version_check)
  CMakeLists.txt:29 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found XKBCommon_XKBCommon: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found version "1.4.1") 
-- Found XKBCommon_X11: /usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so (found version "1.4.1") 
-- Found XKBCommon: /usr/lib/x86_64-linux-gnu/libxkbcommon.so;/usr/lib/x86_64-linux-gnu/libxkbcommon-x11.so (found version "1.4.1")  
-- Checking for module 'glib-2.0>=2.56'
--   Found glib-2.0, version 2.72.3
-- Checking for module 'gio-2.0'
--   Found gio-2.0, version 2.72.3
-- Checking for module 'gio-unix-2.0'
--   Found gio-unix-2.0, version 2.72.3
-- Checking for module 'gobject-2.0'
--   Found gobject-2.0, version 2.72.3
-- Checking for module 'gobject-introspection-1.0'
--   Found gobject-introspection-1.0, version 1.72.0
-- Checking for module 'gtk+-2.0'
--   Found gtk+-2.0, version 2.24.33
-- Checking for module 'gdk-2.0'
--   Found gdk-2.0, version 2.24.33
-- Checking for module 'gdk-x11-2.0'
--   Found gdk-x11-2.0, version 2.24.33
-- Checking for module 'gtk+-3.0'
--   Found gtk+-3.0, version 3.24.34
-- Checking for module 'gdk-3.0'
--   Found gdk-3.0, version 3.24.34
-- Checking for module 'gdk-x11-3.0'
--   Found gdk-x11-3.0, version 3.24.34
-- Checking for module 'gtk4>=4.2'
--   Found gtk4, version 4.6.6
-- Checking for module 'gtk4-x11'
--   Found gtk4-x11, version 4.6.6
-- Found X11: /usr/include   
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- The following OPTIONAL packages have been found:

 * XKBCommon, Keyboard handling library using XKB data, <http://xkbcommon.org>

-- The following REQUIRED packages have been found:

 * ECM
 * X11

-- Configuring done
-- Generating done
-- Build files have been written to: /dev/shm/fcitx5-gtk
$ make
[  3%] Generating marshall.h
INFO: Reading /dev/shm/fcitx5-gtk/gtk-common/marshall.list...
[  7%] Generating marshall.c
INFO: Reading /dev/shm/fcitx5-gtk/gtk-common/marshall.list...
[ 11%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/fcitxgwatcher.c.o
[ 15%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/fcitxgclient.c.o
[ 19%] Building C object fcitx-gclient/CMakeFiles/Fcitx5GClient.dir/marshall.c.o
[ 23%] Linking C static library libFcitx5GClient.a
[ 23%] Built target Fcitx5GClient
[ 26%] Generating FcitxG-1.0.gir
ERROR: can't resolve libraries to shared libraries: Fcitx5GClient
make[2]: *** [fcitx-gclient/CMakeFiles/gobject_introspection_compile_target_1.dir/build.make:79:fcitx-gclient/FcitxG-1.0.gir] 错误 1
make[1]: *** [CMakeFiles/Makefile2:207:fcitx-gclient/CMakeFiles/gobject_introspection_compile_target_1.dir/all] 错误 2
make: *** [Makefile:136:all] 错误 2
$ 

Wayland: GNU Emacs (29, pgtk) 不显示候选框

Describe the bug
在Wayland下面的GNU Emacs里,用fcitx打字,没有候选框(但是可以上屏)

To Reproduce
Steps to reproduce the behavior:

  1. 打开emacs
  2. 打字

Expected behavior
A clear and concise description of what you expected to happen.
候选框应该能出现。

Desktop (please complete the following information):

Additional context
Add any other context about the problem here.

用的是支持pgtk的 emacs 29(开发版)。

 29.0.9999(29-vcs)*l^t(02:29:44 PM 2022-06-12)(acl alsa dbus dynamic-loading gif gmp gpm gtk gui imagemagick inotify jpeg lcms png ssl svg threads tiff xft xpm zlib -X -Xaw3d -aqua -athena -cairo -games -gfile -gsettings -gzip-el -harfbuzz -jit -json -kerberos -libxml2 -livecd -m17n-lib -mailutils -motif -selinux -sound -source -sqlite -systemd -toolkit-scroll-bars -webp -wide-int -xwidgets)

这个问题在强行 X 的 emacs 27 里不出现,甚至还能显示 kimpanel。

Consolidating the project license information

I have read through the code and found that there is not a project-level license information available. For the source code, some of the source files have GPL-2.0+ headers while others have LGPL-2.1+ headers. Is it possible to provide a LICENSE file so that the overall license information is more clear? Besides, it would be even better if the license across all source files are unified.

Thanks very much in advance!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.