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: Another attempt to fix the IME not geting properly enabled #2581

Merged
merged 2 commits into from
May 24, 2024

Conversation

fredizzimo
Copy link
Member

What kind of change does this PR introduce?

The previous attempt of this fix was in:

But it turned out that, the fix caused fcitx to crash all the time, so this fixes it in the correct way, I hope.

NOTE: When I first made this fix, it seemed like it was stil possible to make it go into the wrong state if it was enabled without moving the cursor. But after that I have attempted to repeat it 10s of times without luck, so it's either very random, when it did happen, maybe every other try, and then basically never. Or more likely, fcitx was in some bad state due to my earlier attempts, and therefore caused the problems.

If this happens however, it would be good to capture a log with WAYLAND_DEBUG=1 neovide. If there is a problem, then it's probably because of some race condition when setting the area immediately after the IME has been enabled, and the wayland log might capture that.

Did this PR introduce a breaking change?

A breaking change includes anything that breaks backwards compatibility either at compile or run time.

  • No

Also throttle the requests.

Before these changes fcitx5 would crash on Wayland all the time, so
setting it every frame was clearly not the correct way to fix the
problem. I guess the real issue was that setting the area when it was
not allowed caused the IME system to go into an invalid state.
Copy link

Test Results

  6 files  ±0    6 suites  ±0   21s ⏱️ -3s
110 tests ±0  110 ✅ ±0  0 💤 ±0  0 ❌ ±0 
644 runs  ±0  644 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit de73b5b. ± Comparison against base commit a5b5ae6.

@falcucci falcucci merged commit 7e5a6a2 into neovide:main May 24, 2024
12 checks passed
zbyna pushed a commit to zbyna/neovide that referenced this pull request Jun 1, 2024
…ide#2581)

* Set IME allowed status directly after the window creation

* Don't set the IME area until the IME system accepts it

Also throttle the requests.

Before these changes fcitx5 would crash on Wayland all the time, so
setting it every frame was clearly not the correct way to fix the
problem. I guess the real issue was that setting the area when it was
not allowed caused the IME system to go into an invalid state.
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.

None yet

2 participants