Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup doesn't show up #16

Open
WhyNotHugo opened this issue Jan 19, 2024 · 6 comments
Open

Popup doesn't show up #16

WhyNotHugo opened this issue Jan 19, 2024 · 6 comments

Comments

@WhyNotHugo
Copy link

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:

image

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:

> fcitx5
I2024-01-19 17:00:08.123764 instance.cpp:1323] Override Enabled Addons: {}
I2024-01-19 17:00:08.123801 instance.cpp:1324] Override Disabled Addons: {}
I2024-01-19 17:00:08.127689 xcbconnection.cpp:185] Connecting to X11 display, display name::0.
I2024-01-19 17:00:08.127764 xcbconnection.cpp:190] X11 display: :0 is xwayland.
I2024-01-19 17:00:08.127828 addonmanager.cpp:193] Loaded addon xcb
I2024-01-19 17:00:08.129474 addonmanager.cpp:193] Loaded addon quickphrase
I2024-01-19 17:00:08.129585 addonmanager.cpp:193] Loaded addon imselector
I2024-01-19 17:00:08.135665 addonmanager.cpp:193] Loaded addon keyboard
I2024-01-19 17:00:08.137215 addonmanager.cpp:193] Loaded addon dbus
I2024-01-19 17:00:08.148126 addonmanager.cpp:193] Loaded addon fcitx4frontend
I2024-01-19 17:00:08.149146 addonmanager.cpp:193] Loaded addon ibusfrontend
I2024-01-19 17:00:08.149476 addonmanager.cpp:193] Loaded addon xim
I2024-01-19 17:00:08.150787 addonmanager.cpp:193] Loaded addon wayland
I2024-01-19 17:00:08.151252 addonmanager.cpp:193] Loaded addon dbusfrontend
I2024-01-19 17:00:08.151499 addonmanager.cpp:193] Loaded addon clipboard
I2024-01-19 17:00:08.164216 addonmanager.cpp:193] Loaded addon fcitx5imemojipicker
I2024-01-19 17:00:08.164484 addonmanager.cpp:193] Loaded addon waylandim
I2024-01-19 17:00:08.164630 addonmanager.cpp:193] Loaded addon unicode
I2024-01-19 17:00:08.165130 addonmanager.cpp:193] Loaded addon pinyinhelper
I2024-01-19 17:00:08.209491 inputmethodmanager.cpp:198] Found 737 input method(s) in addon keyboard
I2024-01-19 17:00:08.223497 addonmanager.cpp:193] Loaded addon kimpanel
I2024-01-19 17:00:08.223668 addonmanager.cpp:193] Loaded addon virtualkeyboard
I2024-01-19 17:00:08.253378 classicui.cpp:75] Created classicui for x11 display::0
I2024-01-19 17:00:08.253417 classicui.cpp:96] Created classicui for wayland display:
I2024-01-19 17:00:08.253435 addonmanager.cpp:193] Loaded addon classicui
I2024-01-19 17:00:08.253710 addonmanager.cpp:193] Loaded addon notificationitem
I2024-01-19 17:00:08.254003 addonmanager.cpp:193] Loaded addon notifications
I2024-01-19 17:00:08.254314 kimpanel.cpp:116] Kimpanel new owner: 
I2024-01-19 17:00:08.254331 virtualkeyboard.cpp:223] VirtualKeyboard new owner: 
I2024-01-19 17:00:08.254347 portalsettingmonitor.cpp:91] A new portal show up, start a new query.
E2024-01-19 17:00:08.262800 portalsettingmonitor.cpp:115] DBus call error: org.freedesktop.portal.Error.NotFound Requested setting not found
I2024-01-19 17:00:09.273620 addonmanager.cpp:193] Loaded addon punctuation
I2024-01-19 17:00:09.760561 addonmanager.cpp:193] Loaded addon pinyin
I2024-01-19 17:00:09.762594 addonmanager.cpp:193] Loaded addon cloudpinyin
I2024-01-19 17:00:51.157730 addonmanager.cpp:193] Loaded addon fullwidth
I2024-01-19 17:00:51.160281 addonmanager.cpp:193] Loaded addon chttrans
I2024-01-19 17:00:51.890119 addonmanager.cpp:193] Loaded addon spell
@WhyNotHugo
Copy link
Author

I think that this might be related to #13, but that one seems to have been an issue with KWin, I'm using swaywm.

@GaZaTu
Copy link
Owner

GaZaTu commented Jan 21, 2024

@WhyNotHugo it is the same issue actually, but idk how to configure it in i3/sway

@WhyNotHugo
Copy link
Author

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?

@GaZaTu
Copy link
Owner

GaZaTu commented Jan 21, 2024

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.

@WhyNotHugo
Copy link
Author

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.

@GaZaTu
Copy link
Owner

GaZaTu commented Jan 22, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants