Open WhyNotHugo opened 10 months ago
I think that this might be related to https://github.com/GaZaTu/im-emoji-picker/issues/13, but that one seems to have been an issue with KWin, I'm using swaywm.
@WhyNotHugo it is the same issue actually, but idk how to configure it in i3/sway
Popups for other languages work fine, and the popup itself is rendered by the compositor (I'm using this patch).
What exactly is this add-on doing different in comparison to, for example, Pinyin?
im-emoji-picker doesn't actually use the builtin UI functionality of the input method (fcitx or ibus) and instead uses Qt5 directly. This used to work fine for x11 systems because Qt5 allowed opening windows without grabbing focus but this doesn't work with wayland for some reason.
I suspect that trying to render your own popup window on Wayland will result in all sort of issues. With the current input method APIs, fcitx renders the popup onto a surface and hands this surface off to the compositor. The compositor itself renders then positions and renders the popup surface in the right place. It is not an actual window, nor anything that you can create via Qt. Regular Wayland clients cannot position their own windows; so if you render your own window it'll be impossible to position it in the right place.
What was the problem with the regular popups? It is probably better to try and solve the issues around that and rely on those instead.
I can't really comment on the regular popups because I've never seen them. 🤣 In fact I had never even heard of input methods before trying to make my previous project (https://github.com/GaZaTu/x11-emoji-picker) compatible with wayland. So I basically already had a working emoji picker which I just tried to reuse and that's why I never even attempted to use the builtin UI functionality of any input method.
Sidenote: In a perfect world I wouldn't even need an input method to have an emoji picker but wayland is a piece of **** (or rather its missing functionality). I don't understand why it's not possible to send text as virtual UTF-8 input to other applications (And no I do not care about this so called "iMpRoVeD sEcUrItY" of the wayland protocol compared to X11). -- tangent at 180 heartrate over -- 😊
So yea... im-emoji-picker is a somewhat lost cause. It works for me with the nofocus workaround but that is about it. 🤷 I'm sorry.
The input method popup won't show up when triggering the emoji picker.
For reference, when using another language (Chinese/Pinyin) the picker shows fine:
But when pressing the shortcut for im-emoji-picker, it just flashes for a moment and disappears. I'm using fcitx, and I don't see anything interesting in its output: