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

[KDE/Wayland/fcitx5] Emoji picker appears and then vanishes immediately #13

Closed
milas opened this issue Oct 28, 2023 · 8 comments
Closed

Comments

@milas
Copy link

milas commented Oct 28, 2023

Splitting this out from the conversation in #11:

ok the only thing i can imagine at this point is that there must be some kind of bug with KDE (wayland) + fcitx5 because fcitx immediately sends the deactivate event after the window opens (which is obviously wrong) and then it goes dark.
if i start the fcitx daemon with QT_QPA_PLATFORM=xcb it kinda works but that's obviously no solution.

Originally posted by @GaZaTu in #11 (comment)

I filed an upstream issue with @ fcitx/fcitx5#887, and the maintainer responded:

That's however, not a solvable issue from fcitx side.

Mainly it's because that the emoji picker itself embeds Qt and it will grab the focus away on wayland. that's why you see the deactivate event.


At this point, it's not clear to me where the issue lies - is this a kwin thing? Why do we not see the same behavior under X11?

For reference, here's my system configuration:

KWin version: 5.27.9
Qt Version: 5.15.10
Qt compile version: 5.15.10
XCB compile version: 1.16

fcitx version: 5.1.1
Kernel: 6.5.9

I also tried using latest HEAD from both fcitx + im-emoji-picker.

@GaZaTu
Copy link
Owner

GaZaTu commented Oct 28, 2023 via email

@shadmansaleh
Copy link

Any update on this? I think I'm facing same issue with ibus-wayland on kde too.

@GaZaTu
Copy link
Owner

GaZaTu commented Jan 3, 2024

@shadmansaleh i did not look into this again but i doubt anything changed yet. There currently does not seem to be a way to tell Qt "open a new window but do not take focus" when using wayland.

So the only way for now seems to be a custom window rule in the KDE settings. (which is what i did)

@milas
Copy link
Author

milas commented Jan 6, 2024

For reference, here's what my ~/.config/kwinrulesrc looks like:

[1]
Description=Emoji Picker
acceptfocusrule=2
title=im-emoji-picker
titlematch=2
types=1

[General]
count=1
rules=1

Configuring it in the GUI:
Screenshot of the KDE Window Rules configuration pane with a rule targeting window title of "im-emoji-picker" and setting "Accept Focus" to "Force" and "No"


Things are working well for me since applying that change on KDE 5.27.10 + Wayland (on NixOS unstable) using fcitx5.

Thanks for this, it's pretty great. Maybe Qt6 will fix things? 🫣 <-- emoji typed with im-emoji-picker

@milas milas closed this as completed Jan 6, 2024
@milas
Copy link
Author

milas commented Jan 6, 2024

btw I had to launch Firefox under xwayland to respond to this issue. This issue literally breaks input on Firefox+Wayland for me. Specifically this issue. I can comment on other GitHub issues but not this one.

(This has nothing to do with im-emoji-picker. It happens even without fcitx5 running. I have no explanation and don't even know how to report that as a bug to Firefox, so I felt like sharing here 😛)

@GaZaTu
Copy link
Owner

GaZaTu commented Jan 6, 2024

lol that is oddly specific. i did not have that happen before but i guess i don't comment on too many issues. and glad you're still enjoying the emoji picker 😙

@zelch
Copy link

zelch commented Mar 2, 2024

@GaZaTu Sorry to resurrect a dead bug, but could we get a note about this in the README?

I spent some time trying to figure it out before stumbling across this closed bug.

@GaZaTu
Copy link
Owner

GaZaTu commented Mar 2, 2024

done @zelch 👌

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

4 participants