… | |
… | |
1211 | XPoint nspot; |
1211 | XPoint nspot; |
1212 | XVaNestedList preedit_attr; |
1212 | XVaNestedList preedit_attr; |
1213 | |
1213 | |
1214 | if (!Input_Context |
1214 | if (!Input_Context |
1215 | || !focus |
1215 | || !focus |
1216 | || !(input_style & XIMPreeditPosition)) |
1216 | || !(input_style & (XIMPreeditPosition | XIMPreeditCallbacks))) |
1217 | return; |
1217 | return; |
1218 | |
1218 | |
1219 | im_set_position (nspot); |
1219 | im_set_position (nspot); |
1220 | |
1220 | |
1221 | if (nspot.x == spot.x && nspot.y == spot.y) |
1221 | if (nspot.x == spot.x && nspot.y == spot.y) |
… | |
… | |
1481 | XNFontSet, fs, |
1481 | XNFontSet, fs, |
1482 | NULL); |
1482 | NULL); |
1483 | } |
1483 | } |
1484 | else if (input_style & XIMPreeditCallbacks) |
1484 | else if (input_style & XIMPreeditCallbacks) |
1485 | { |
1485 | { |
|
|
1486 | im_set_position (spot); |
|
|
1487 | |
1486 | xcb[0].client_data = (XPointer)this; xcb[0].callback = (XIMProc)xim_preedit_start; |
1488 | xcb[0].client_data = (XPointer)this; xcb[0].callback = (XIMProc)xim_preedit_start; |
1487 | xcb[1].client_data = (XPointer)this; xcb[1].callback = (XIMProc)xim_preedit_done; |
1489 | xcb[1].client_data = (XPointer)this; xcb[1].callback = (XIMProc)xim_preedit_done; |
1488 | xcb[2].client_data = (XPointer)this; xcb[2].callback = (XIMProc)xim_preedit_draw; |
1490 | xcb[2].client_data = (XPointer)this; xcb[2].callback = (XIMProc)xim_preedit_draw; |
1489 | #if 0 |
1491 | #if 0 |
1490 | xcb[3].client_data = (XPointer)this; xcb[3].callback = (XIMProc)xim_preedit_caret; |
1492 | xcb[3].client_data = (XPointer)this; xcb[3].callback = (XIMProc)xim_preedit_caret; |
1491 | #endif |
1493 | #endif |
1492 | |
1494 | |
1493 | preedit_attr = XVaCreateNestedList (0, |
1495 | preedit_attr = XVaCreateNestedList (0, |
|
|
1496 | XNSpotLocation, &spot, |
1494 | XNPreeditStartCallback, &xcb[0], |
1497 | XNPreeditStartCallback, &xcb[0], |
1495 | XNPreeditDoneCallback , &xcb[1], |
1498 | XNPreeditDoneCallback , &xcb[1], |
1496 | XNPreeditDrawCallback , &xcb[2], |
1499 | XNPreeditDrawCallback , &xcb[2], |
1497 | #if 0 |
1500 | #if 0 |
1498 | XNPreeditCaretCallback, &xcb[3], |
1501 | XNPreeditCaretCallback, &xcb[3], |