在fl_open_display()中添加以下兩句:
// Add by cyantree, for root-window ime
if (!XSupportsLocale()) {
//(void) fprintf(stderr, "%s: X does not support locale %s.", program_name, setlocale(LC_ALL, NULL));
//exit(1);
}
if (XSetLocaleModifiers("") == NULL) {
//(void) fprintf(stderr, "%s: Warning: cannot set locale modifiers.", argv[0]);
}
原因是在crunchbang linux下面輸入法是root-window模式,所以需要這么設(shè)置,至于什么是root window,可以參考x11的說(shuō)明
另外在Elementary OS下面還是不能調(diào)用輸入法,估計(jì)原因是差不多的,但是修正方法還不夠,有空的時(shí)候再說(shuō),最近在折騰android移植到fltk,沒什么時(shí)間