fcitx / fcitx5

maybe a new fcitx.
1.6k stars 118 forks source link

Customize theme don't work in electron applications | 自定义主题在 electron 应用中不起作用 #901

Closed OrkWard closed 11 months ago

OrkWard commented 11 months ago

Describe the bug Changes settings in Addons - UI - Classic User Interface don't work in electron based applications, includes chrome. Using fcitx5-rime.

更改主题在 electron 应用中不起作用,包括 chrome,在 Qt 应用中正常。包括字体大小、排列方向等所有设置项一概不起作用。输入、选字功能正常。此外,选字框的位置也发生了一定偏移(这个应该与我的系统缩放有关)

loeEu.png

loitI.png

To Reproduce Steps to reproduce the behavior: I don't know how to exactly reproduce the bug. I've tried start chrome with --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-wayland-ime, even the ime itself don't work now.

我不太清楚如何重现该问题,使用上述启动参数后连正常输入都做不到了。

Desktop (please complete the following information):

System Info:

  1. uname -a:

    Linux debian 6.5.7-surface-2 #2 SMP PREEMPT_DYNAMIC Sun Oct 29 12:36:11 UTC 2023 x86_64 GNU/Linux
  2. lsb_release -a:

    Distributor ID: Debian
    Description:    Debian GNU/Linux 12 (bookworm)
    Release:        12
    Codename:       bookworm
  3. lsb_release -d:

    Description:    Debian GNU/Linux 12 (bookworm)
  4. /etc/lsb-release:

    /etc/lsb-release not found.

  5. /etc/os-release:

    PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
    NAME="Debian GNU/Linux"
    VERSION_ID="12"
    VERSION="12 (bookworm)"
    VERSION_CODENAME=bookworm
    ID=debian
    HOME_URL="https://www.debian.org/"
    SUPPORT_URL="https://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
  6. Desktop Environment:

    Desktop environment is kde.

  7. XDG SESSION TYPE:

    XDG_SESSION_TYPE='wayland'
  8. Bash Version:

    BASH_VERSION='5.2.15(1)-release'

Environment:

  1. DISPLAY:

    DISPLAY=':1'
    
    WAYLAND_DISPLAY='wayland-0'
  2. Keyboard Layout:

    1. setxkbmap:

      WARNING: Running setxkbmap against an XWayland server
      xkb_keymap {
          xkb_keycodes  { include "evdev+aliases(qwerty)" };
          xkb_types     { include "complete"      };
          xkb_compat    { include "complete"      };
          xkb_symbols   { include "pc+us+inet(evdev)"     };
          xkb_geometry  { include "pc(pc105)"     };
      };
    2. xprop:

      _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "us", "", ""
  3. Locale:

    1. All locales:

      C
      C.utf8
      en_HK.utf8
      POSIX
    2. Current locale:

      LANG=en_HK.UTF-8
      LANGUAGE=en_HK:en
      LC_CTYPE="en_HK.UTF-8"
      LC_NUMERIC="en_HK.UTF-8"
      LC_TIME="en_HK.UTF-8"
      LC_COLLATE="en_HK.UTF-8"
      LC_MONETARY="en_HK.UTF-8"
      LC_MESSAGES="en_HK.UTF-8"
      LC_PAPER="en_HK.UTF-8"
      LC_NAME="en_HK.UTF-8"
      LC_ADDRESS="en_HK.UTF-8"
      LC_TELEPHONE="en_HK.UTF-8"
      LC_MEASUREMENT="en_HK.UTF-8"
      LC_IDENTIFICATION="en_HK.UTF-8"
      LC_ALL=
  4. Directories:

    1. Home:

      /home/orks
    2. ${XDG_CONFIG_HOME}:

      Environment variable XDG_CONFIG_HOME is not set.

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

    3. Fcitx5 Settings Directory:

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

  5. Current user:

    The script is run as orks (1000).

Fcitx State:

  1. executable:

    Found fcitx5 at /usr/bin/fcitx5.

  2. version:

    Fcitx version: 5.0.21

  3. process:

    Found 1 fcitx5 process:

      18440 fcitx5
  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.519.

    PID of DBus name org.fcitx.Fcitx5 owner is 18440.

    Debug information from dbus:

       Group [x11::1] has 2 InputContext(s)
      IC [a506f999046a42c7ac5d896defe5d16f] program:obsidian frontend:dbus cap:6000000012 focus:0
      IC [6a36e0bf85ab4457987af394931d83cd] program:google-chrome-stable frontend:dbus cap:6000000012 focus:0
    Group [wayland:] has 13 InputContext(s)
      IC [a3488871284a449599415a5253279f8f] program:plasmashell frontend:dbus cap:1e001800072 focus:0
      IC [5fd96b077c3e444bb77ce7bb70f9b1fc] program:konsole frontend:dbus cap:e001800072 focus:1
      IC [717f0e71e1874a75ab494afe7004b391] program:plasmashell frontend:dbus cap:0 focus:0
      IC [100824c025534aa69421541657a20aaa] program:plasmashell frontend:dbus cap:0 focus:0
      IC [621d8b02ef414810b54f17f7bb9d3e1e] program:konsole frontend:dbus cap:0 focus:0
      IC [e8b391fa727d4628b0992439fae73d01] program:plasmashell frontend:dbus cap:0 focus:0
      IC [09c87dd16abd40bd82e6bd83a12ab0e8] program:plasmashell frontend:dbus cap:1e001800072 focus:0
      IC [62e94e329160439592c394adf7cac49d] program:kate frontend:dbus cap:0 focus:0
      IC [255b25002f324a16bfbe6b56d8c99e6a] program:plasmashell frontend:dbus cap:0 focus:0
      IC [55c926f4a72043e0bf7de6be5309c7b2] program:plasmashell frontend:dbus cap:1e001800072 focus:0
      IC [00c7820370e04355908ed3b4015d0cd4] program:kate frontend:dbus cap:1e001800072 focus:0
      IC [206be45cb6574dda9bd896cd3f42487b] program:konsole frontend:dbus cap:0 focus:0
      IC [4b19bc454e064aa2a1389c8524a00549] program:kate 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:

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 fcitx5 qt5 module: /usr/lib/x86_64-linux-gnu/fcitx5/qt5/libfcitx-quickphrase-editor5.so. Found fcitx5 im module for qt6: /usr/lib/x86_64-linux-gnu/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so. Found fcitx5 im module for qt5: /usr/lib/x86_64-linux-gnu/qt5/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:

      Cannot find gtk-query-immodules for gtk 2

      Cannot find fcitx5 im module for gtk 2.

    2. gtk 3:

      Cannot find gtk-query-immodules for gtk 3

      Cannot find fcitx5 im module for gtk 3.

  3. Gtk IM module cache:

    1. gtk 2:

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

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

      Failed to find fcitx5 in immodule cache at /usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules.cache

      Cannot find fcitx5 im module for gtk 2 in cache.

    2. gtk 3:

      Found immodules cache for gtk 3.24.38 at /usr/lib/x86_64-linux-gnu/gtk-3.0/3.0.0/immodules.cache. Version Line:

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

      Found fcitx5 im modules for gtk 3.24.38.

      "/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:

      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 19 enabled addons:

      Classic User Interface 5.0.21
      Clipboard 5.0.21
      DBus 5.0.21
      DBus Frontend 5.0.21
      Emoji 5.0.21
      Fcitx4 Frontend 5.0.21
      IBus Frontend 5.0.21
      Input method selector 5.0.21
      Keyboard 5.0.21
      KDE Input Method Panel 5.0.21
      Status Notifier 5.0.21
      Notification 5.0.21
      Rime 5.0.15
      Spell 5.0.21
      Unicode 5.0.21
      Wayland 5.0.21
      Wayland Input method frontend 5.0.21
      XCB 5.0.21
      X Input Method Frontend 5.0.21
    2. Found 1 disabled addons:

      Quick Phrase 5.0.21
  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

    Kimpanel process:

      13676 /usr/bin/plasmashell --no-respawn

Input Methods:

  1. /home/orks/.config/fcitx5/profile:

    [Groups/0]
    # Group Name
    Name=Default
    # Layout
    Default Layout=us
    # Default Input Method
    DefaultIM=rime
    
    [Groups/0/Items/0]
    # Name
    Name=rime
    # Layout
    Layout=
    
    [GroupOrder]
    0=Default

Log:

  1. date:

    Monday, November 20, 2023 AM02:42:22 HKT
  2. /home/orks/.config/fcitx5/crash.log:

    /home/orks/.config/fcitx5/crash.log not found.

Additional context Add any other context about the problem here.

wengxt commented 11 months ago

从面板上把 kimpanel 删掉即可。

在最新的版本里行为会有一些区别,不过既然你在用 debian 也没什么更新到最新版的办法,所以还是删掉 kimpanel 最简单直接了。

OrkWard commented 11 months ago

顺利解决,非常感谢!