Skip to content

WIP: Fixed im service

Administrator requested to merge Fixed_im_service into master

Currently the protocol state is not behaving as expected. Only events from the wayland server caused changes to the pending IMProtocolState, but requests from the client like CommitString + Commit did not. After commiting a string at least phoc does not send a SurroundingText event so the IMProtocolState would never be updated. Also the first 'Done' event lead to the execution of the imservice_handle_done() function. This method set the pending IMProtocolState to the default, which is an empty string for surrounding_text.

Oh and the preedit_string is never changed or read so I guess it can be removed? I assume it was meant for the PreeditString request, but since that is never sent/used it seems unnecessary.

I think I fixed those errors with this MR but I did not test it at all. My rls did not seem to like the mix between C and Rust and refused to show me errors in the code or lints so there probably are a few errors. I hope you understand the intention of the changes and can fix it regardless. I thought a MR would be easier to understand, even if it is not fully working.

Merge request reports