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

Fix to work on wlroots>=0.17.1 by changing increasing order of serial #664

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

xnuk
Copy link
Contributor

@xnuk xnuk commented Mar 21, 2024

Summary

Fixes #663

Note

The serial number reflects the last state of the zwp_input_method_v2 object known to the client. The value of the serial argument must be equal to the number of done events already issued by that object. When the compositor receives a commit request with a serial different than the number of past done events, it must proceed as normal, except it should not change the current state of the zwp_input_method_v2 object.

https://wayland.app/protocols/input-method-unstable-v2#zwp_input_method_v2:request:commit

다른 곳 치우고 ImEvent::Done에서만 serial을 1씩 증가하게 바꾸니 일단은 작동하는 거 같습니다.

wlroots/wlroots#4497을 읽어봤더니, current_serial은 0부터 시작해서 wlr_input_method_v2_send_done에서 1씩 올리고, 이렇게 예측한 current_serial이 받은 serial과 다르면 리셋을 해버리는 모양입니다. 다만 한 번 예측이 틀어지면 current_serial이 다시 0부터 시작해서 영원히 틀어지는 게 문제가 될 거 같긴 하네요 어떻게 그게 재현이 될 지는 아직 모르겠는데

Checklist

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

xnuk added 2 commits March 21, 2024 23:21
Fixes Riey#663

> The serial number reflects the last state of the zwp_input_method_v2 object known to the client. The value of the serial argument must be equal to the **number of done events** already issued by that object. When the compositor receives a commit request with a serial different than the number of past done events, it must proceed as normal, except it should not change the current state of the zwp_input_method_v2 object.

https://wayland.app/protocols/input-method-unstable-v2#zwp_input_method_v2:request:commit
@Riey Riey merged commit 01ee479 into Riey:develop Mar 21, 2024
4 checks passed
@xnuk xnuk deleted the serial branch March 21, 2024 16:49
Jhyub added a commit to Jhyub/kime that referenced this pull request Apr 6, 2024
@Riey Riey mentioned this pull request Aug 11, 2024
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

Successfully merging this pull request may close these issues.

Sway 1.9 부터 한글 입력이 되지 않습니다
2 participants