On Tue, Mar 29, 2022 at 3:58 PM Shengjing Zhu <z...@debian.org> wrote: > > On Tue, Mar 29, 2022 at 3:13 PM Osamu Aoki <os...@debian.org> wrote: > > > > Hi, > > > > Let me assess situation more verbosely. > > > > > -----Original Message----- > > > From: Shengjing Zhu <z...@debian.org> > > > To: Gunnar Hjalmarsson <gunna...@debian.org> > > > Cc: 1008...@bugs.debian.org, Osamu Aoki <os...@debian.org> > > > Subject: Re: Bug#1008481: Add SDL_IM_MODULE to fcitx4 and fcitx5 > > > Date: Tue, 29 Mar 2022 03:27:36 +0800 > > > > > > On Tue, Mar 29, 2022 at 3:05 AM Gunnar Hjalmarsson <gunna...@debian.org> > > > wrote: > > > > > > > > On 2022-03-28 08:28, Shengjing Zhu wrote: > > > > > On Mon, Mar 28, 2022 at 11:37 AM Osamu Aoki <os...@debian.org> wrote: > > > > > > > > > > > > Hi, > > > > > > > > > > > > These bugs seem ***somewhat*** similar: > > > > Yes, I understand these are not the same problem. > > > > With your explanation, I think I am clear about issues. > > > > > > > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990316 > > > > > > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008481 > > > > > > > > > > > > > > > > AFAICT, GLFW_IM_MODULE is different from SDL_IM_MODULE. > > > > > > > > > > I can't find GLFW_IM_MODULE in glfw code, it only appears in kitty's > > > > > glfw fork. > > > > The upstream of glfw doesn't support GLFW_IM_MODULE. > > > > The vendored copy of glfw in the popular kitty supports GLFW_IM_MODULE and > > kitty > > upstream still advises not to enable this input method support as the > > default > > setting. > > > > So we decided not to enable it from im-config > > > > Since fcitx5 uses the same protocol as ibus, documented proposed workaround > > was to > > set GLFW_IM_MODULE=ibus for both ibus case and fcitx5 case. fcitx4 isn't > > supported > > and no proposed setting. > > > > > > > But SDL_IM_MODULE can be found in sdl2 code. > > > > > Ref: > > > > > > > > https://github.com/libsdl-org/SDL/blob/120c76c8/src/core/linux/SDL_ime.c#L46-L49 > > > > The upstream of sdl in Debian has been supporting fcitx via SDL_IM_MODULE > > for some > > time. > > > > No popular programs in Debian used modern sdl2 so the support of fcitx via > > SDL_IM_MODULE was never raised nor addressed in im-config. It should have > > been and > > is a valid feature addition case for im-config. > > > > > ... > > > 2. Changing sdl2 upstream takes too long to propagate. SDL_IM_MODULE > > > appeared in sdl2 since 2016 > > > https://github.com/libsdl-org/SDL/commit/808c75d1 > > > User asks for this for Dota2 game, which seems hard to get sdl2 > > > updated... > > > > The vendored copy of sdl2 in the popular non-Debian DOTA finally got > > updated and now > > support of fcitx (fcitx4?) via SDL_IM_MODULE is a desirable feature. So > > there is > > significant desire to set up fcitx for sdl2 from the user. > > > > We know from glfw discussion, fcitx4 and fcitx5 uses different protocol. > > (fcitx5==ibus) > > > > My question is what is the correct value for SDL_IM_MODULE which works with > > Debian's > > sdl2 and DOTA's sdl2?. > > > > ibus --> no setting for SDL_IM_MODULE > > fcitx (fcitx4) --> SDL_IM_MODULE=fcitx > > fcitx5 --> SDL_IM_MODULE=fcitx5 or SDL_IM_MODULE=ibus > > > > Just to answer the protocol part. > > IMO, there are at least 4 protocols that fcitx5 supports. > + fcitx5, at dbus org.fcitx.Fcitx-0 > + fcitx4, at dbus org.fcitx.Fcitx5
Typo: the bus address for fcitx4 and fcitx5 should be exchanged. > + dbus, at dbus address org.freedesktop.portal.Fcitx > + ibus, at dbus address org.freedesktop.portal.IBus > > Both fcitx4 and fcitx5 have a dbus frontend, and they listen on the > same address. > sdl2 implements fcitx support with dbus frontend. So both fcitx4 and > fcitx5 support it. > > For kitty, it only supports ibus, but it can also connect to fcitx5's > ibus frontend. > For sdl2, it supports ibus, so it can connect to fcitx5's ibus > frontend as well, but since there's native fcitx support, using fcitx > dbus frontend is preferred. > > In conclusion, > > For SDL_IM_MODULE > > + fcitx(fcitx4) --> SDL_IM_MODULE=fcitx > + fcitx5 --> SDL_IM_MODULE=fcitx > + ibus --> no setting > + others --> no settings > -- Shengjing Zhu