… | |
… | |
513 | |
513 | |
514 | check_ev.start (); |
514 | check_ev.start (); |
515 | |
515 | |
516 | HOOK_INVOKE ((this, HOOK_START, DT_END)); |
516 | HOOK_INVOKE ((this, HOOK_START, DT_END)); |
517 | |
517 | |
|
|
518 | #if ENABLE_XEMBED |
|
|
519 | if (rs[Rs_embed]) |
|
|
520 | { |
|
|
521 | long info[2] = { 0, XEMBED_MAPPED }; |
|
|
522 | |
|
|
523 | XChangeProperty (display->display, parent[0], xa[XA_XEMBED_INFO], xa[XA_XEMBED_INFO], |
|
|
524 | 32, PropModeReplace, (unsigned char *)&info, 2); |
|
|
525 | } |
|
|
526 | #endif |
|
|
527 | |
518 | XMapWindow (disp, vt); |
528 | XMapWindow (disp, vt); |
519 | XMapWindow (disp, parent[0]); |
529 | XMapWindow (disp, parent[0]); |
520 | |
530 | |
521 | return true; |
531 | return true; |
522 | } |
532 | } |
… | |
… | |
1211 | XPoint nspot; |
1221 | XPoint nspot; |
1212 | XVaNestedList preedit_attr; |
1222 | XVaNestedList preedit_attr; |
1213 | |
1223 | |
1214 | if (!Input_Context |
1224 | if (!Input_Context |
1215 | || !focus |
1225 | || !focus |
1216 | || !(input_style & XIMPreeditPosition)) |
1226 | || !(input_style & (XIMPreeditPosition | XIMPreeditCallbacks))) |
1217 | return; |
1227 | return; |
1218 | |
1228 | |
1219 | im_set_position (nspot); |
1229 | im_set_position (nspot); |
1220 | |
1230 | |
1221 | if (nspot.x == spot.x && nspot.y == spot.y) |
1231 | if (nspot.x == spot.x && nspot.y == spot.y) |
… | |
… | |
1300 | DT_INT, call_data->chg_first, |
1310 | DT_INT, call_data->chg_first, |
1301 | DT_INT, call_data->chg_length, |
1311 | DT_INT, call_data->chg_length, |
1302 | DT_END)); |
1312 | DT_END)); |
1303 | } |
1313 | } |
1304 | |
1314 | |
|
|
1315 | #if 0 |
1305 | static void |
1316 | static void |
1306 | xim_preedit_caret (XIC ic, XPointer client_data, XIMPreeditCaretCallbackStruct *call_data) |
1317 | xim_preedit_caret (XIC ic, XPointer client_data, XIMPreeditCaretCallbackStruct *call_data) |
1307 | { |
1318 | { |
1308 | ((rxvt_term *)client_data)->make_current (); |
1319 | ((rxvt_term *)client_data)->make_current (); |
1309 | HOOK_INVOKE (((rxvt_term *)client_data, HOOK_XIM_PREEDIT_CARET, |
1320 | HOOK_INVOKE (((rxvt_term *)client_data, HOOK_XIM_PREEDIT_CARET, |
1310 | DT_INT, call_data->position, |
1321 | DT_INT, call_data->position, |
1311 | DT_INT, call_data->direction, |
1322 | DT_INT, call_data->direction, |
1312 | DT_INT, call_data->style, |
1323 | DT_INT, call_data->style, |
1313 | DT_END)); |
1324 | DT_END)); |
1314 | } |
1325 | } |
|
|
1326 | #endif |
1315 | |
1327 | |
1316 | #endif |
1328 | #endif |
1317 | |
1329 | |
1318 | /* |
1330 | /* |
1319 | * Try to open a XIM with the current modifiers, then see if we can |
1331 | * Try to open a XIM with the current modifiers, then see if we can |
… | |
… | |
1479 | XNFontSet, fs, |
1491 | XNFontSet, fs, |
1480 | NULL); |
1492 | NULL); |
1481 | } |
1493 | } |
1482 | else if (input_style & XIMPreeditCallbacks) |
1494 | else if (input_style & XIMPreeditCallbacks) |
1483 | { |
1495 | { |
|
|
1496 | im_set_position (spot); |
|
|
1497 | |
1484 | xcb[0].client_data = (XPointer)this; xcb[0].callback = (XIMProc)xim_preedit_start; |
1498 | xcb[0].client_data = (XPointer)this; xcb[0].callback = (XIMProc)xim_preedit_start; |
1485 | xcb[1].client_data = (XPointer)this; xcb[1].callback = (XIMProc)xim_preedit_done; |
1499 | xcb[1].client_data = (XPointer)this; xcb[1].callback = (XIMProc)xim_preedit_done; |
1486 | xcb[2].client_data = (XPointer)this; xcb[2].callback = (XIMProc)xim_preedit_draw; |
1500 | xcb[2].client_data = (XPointer)this; xcb[2].callback = (XIMProc)xim_preedit_draw; |
|
|
1501 | #if 0 |
1487 | xcb[3].client_data = (XPointer)this; xcb[3].callback = (XIMProc)xim_preedit_caret; |
1502 | xcb[3].client_data = (XPointer)this; xcb[3].callback = (XIMProc)xim_preedit_caret; |
|
|
1503 | #endif |
1488 | |
1504 | |
1489 | preedit_attr = XVaCreateNestedList (0, |
1505 | preedit_attr = XVaCreateNestedList (0, |
|
|
1506 | XNSpotLocation, &spot, |
1490 | XNPreeditStartCallback, &xcb[0], |
1507 | XNPreeditStartCallback, &xcb[0], |
1491 | XNPreeditDoneCallback , &xcb[1], |
1508 | XNPreeditDoneCallback , &xcb[1], |
1492 | XNPreeditDrawCallback , &xcb[2], |
1509 | XNPreeditDrawCallback , &xcb[2], |
|
|
1510 | #if 0 |
1493 | XNPreeditCaretCallback, &xcb[3], |
1511 | XNPreeditCaretCallback, &xcb[3], |
|
|
1512 | #endif |
1494 | NULL); |
1513 | NULL); |
1495 | } |
1514 | } |
1496 | |
1515 | |
1497 | Input_Context = XCreateIC (xim, |
1516 | Input_Context = XCreateIC (xim, |
1498 | XNInputStyle, input_style, |
1517 | XNInputStyle, input_style, |