Hi, Recently I'm investigating how to implement surrounding text support in SCIM XIM server. I found that XIMStringConversionCallback API in XIM can be used to do such job. But laterly I found that the implementation of this API in libX11 is broken. You may read the source file lib/X11/imCallbk.c line 285-365 _XimStrConversionCallback function. The implementation of this function is completely broken, for example, it doesn't handle null pointer exceptions, wide_char and multibyte string issue and doesn't do memory free, etc. I'll try to fix the implementation, but I'm not a X11 expert, so I'll very apperciate if you can fix it or give me some hint on how to fix it. ps. surrounding text support very important for some CTL languages.
> I'll try to fix the implementation, but I'm not a X11 expert, so I'll very > apperciate if you can fix it or give me some hint on how to fix it. I don't think anybody alive in X.Org today is a XIM expert and therefore hell will freeze over before anybody will fix this. Therefore if you want to see this fixed please submit a patch. In my opinion XIM is a broken implementation of a broken design and should be deprecated as there are more viable replacements for it today.
But nowadays, XIM is still widely used, especially many legacy applications and KDE/QT apps. However, I'll try to fix this issue.
You're welcome to fix this. I know too little about XIM to be able to judge, but maybe there is a way to keep the XIM ABI with a different IM backend to support legacy apps in the future. This is partly the goal of your work to interface to SCIM. But it is also to goal of this work to keep XIM around to retain all its functionalities - including the ABI for BE IM servers. The question is if this stuff is still required of if the interface can be made a lot 'thinner'. We need to have a word with the KDE/Qt people about this issue. There may still be a lot of unresolved issues with XIM and multithreading lingering in the background which will be a major obstacle for KDE to make apps multi threaded. Convincing maintianed toolkits that XIM is crap is easy. The hard part is what to do about legacy apps.
Sorry about the phenomenal bug spam, guys. Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Egbert, what should we do abou this? James, is this still an issue?
No update on this one since more than 3 years. Closing as WONTFIX.
I'd like to fix it. I've made a patch on libx11-1.1.5. Please review my patch.
Created attachment 20513 [details] [review] fix string conversion implementation
Before using string conversion feature, xim client should query XIMValuesList first. But libx11 doesn't have any routine to deal with XIMValuesList. I also made a patch for it.
Created attachment 20519 [details] [review] implemetation for XIMValuesList
I'm afraid I'm not the right person to review these patches. :-(
Created attachment 21275 [details] [review] XIM string conversion implementation XIM string conversion implementation patch.
Choe, can you please send these patches to xorg-devel? That will reach a wider audience in order to get a proper review of these changes. Thanks.
(In reply to comment #13) > Choe, can you please send these patches to xorg-devel? That will reach a wider > audience in order to get a proper review of these changes. > > Thanks. Ok, I will make new patches against recent git master HEAD, and then send them to xorg-devel.
Mass closure: This bug has been untouched for more than six years, and is not obviously still valid. Please reopen this bug or file a new report if you continue to experience issues with current releases.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.