cjacker wrote:This is a dirty fix but at least works. cursor position update also supported.
Use LD_PRELOAD to reimplement gtk_im_context_set_client_window and set im focus in.
use "gdk_region_get_clipbox" to catch the caret position. (It's really difficult to find which function can catch the position....)
...
I've tried your method and got the following result:
- Code: Select all
$ gcc -shared -o libsublime-imfix.so sublime_imfix.c `pkg-config --libs --cflags gtk+-2.0` -fPIC
$ LD_PRELOAD=./libsublime-imfix.so sublime-text
ERROR: ld.so: object './libsublime-imfix.so' from LD_PRELOAD cannot be preloaded: ignored.
- Code: Select all
$ uname -ai
Linux tonytonyjan-Latitude-6430U 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Is there any message I can give you?