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

Add Wayland zwp_input_method_v1 support #659

Merged
merged 13 commits into from
Apr 8, 2024
Merged

Conversation

Jhyub
Copy link
Contributor

@Jhyub Jhyub commented Dec 26, 2023

Summary

This PR introduces support for Wayland zwp_input_method_v1.
This enables IME input with non-GTK/QT wayland software under certain compositors such as KWin Wayland.
The PR also introduces minor changes in desktop files to make kime functional under KDE Plasma Wayland.

Note

Checklist

  • I have documented my changes properly to adequate places
  • I have updated the docs/CHANGELOG.md

@Riey Riey added the T-Wayland label Dec 27, 2023
@black7375
Copy link

black7375 commented Jan 6, 2024

I've confirmed that KIME works in Plasma Wayland session.
(Plasma Wayland 세션에서 KIME가 동작함을 확인하였습니다.)

image
image
image

@OctopusET
Copy link
Contributor

It works with Weston 13.0.0

To use kime on weston, you need to add this to weston.ini

[input-method]
path=/usr/bin/kime

@Jhyub
Copy link
Contributor Author

Jhyub commented Jan 8, 2024

I did not implement kime-check for weston because it seems to be impossible to find out if kime is running under weston.

@OctopusET
Copy link
Contributor

It's pretty messed up, but there is a way to get the compositor name without using theXDG_CURRENT_DESKTOP env.

https://stackoverflow.com/questions/69302630/wayland-client-get-compositor-name

@OctopusET
Copy link
Contributor

And even in sway, there's no guarantee sway session always have the XDG_CURRENT_DESKTOP env.
swaywm/sway#4876

@Jhyub
Copy link
Contributor Author

Jhyub commented Jan 8, 2024

It seems better not to unwrap env::var("XDG_CURRENT_DESKTOP") then...

@Jhyub
Copy link
Contributor Author

Jhyub commented Jan 8, 2024

It's pretty messed up, but there is a way to get the compositor name without using theXDG_CURRENT_DESKTOP env.

https://stackoverflow.com/questions/69302630/wayland-client-get-compositor-name

This method seems a little bit too hacky to use... maybe it might be better to detect if weston is installed? (such as if /usr/share/weston exists)

@OctopusET
Copy link
Contributor

IMHO, I don't think it's the IME's job to check if it works or not.
And yeah, that solution is really hacky way, I guess if you really want to add some checker for the Weston. Checking software like neofetch would be a good way to find the way to get a compositor's name.

@Jhyub
Copy link
Contributor Author

Jhyub commented Jan 8, 2024

Since that would result in adding another dependency, and considering that weston doesn't seem to have many real-world use cases (if I understood its project goals correctly) it seems more reasonable to me as well not to implement kime-check for it.

@Riey Riey merged commit f82ce41 into Riey:develop Apr 8, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wayland 세션에서 qt와 gtk를 사용하지 않는 프로그램들 한글 입력 불가
4 participants