… | |
… | |
1621 | || !focus |
1621 | || !focus |
1622 | || !(input_style & (XIMPreeditArea | XIMPreeditPosition)) |
1622 | || !(input_style & (XIMPreeditArea | XIMPreeditPosition)) |
1623 | || !IMisRunning ()) |
1623 | || !IMisRunning ()) |
1624 | return; |
1624 | return; |
1625 | |
1625 | |
|
|
1626 | if (input_style & XIMPreeditArea) |
|
|
1627 | { |
|
|
1628 | im_set_size (preedit_rect); |
|
|
1629 | preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); |
|
|
1630 | |
|
|
1631 | XSetICValues (Input_Context, |
|
|
1632 | XNPreeditAttributes, preedit_attr, NULL); |
|
|
1633 | } |
|
|
1634 | else |
|
|
1635 | { |
1626 | /* Getting the necessary width of preedit area */ |
1636 | /* Getting the necessary width of preedit area */ |
1627 | status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL); |
1637 | status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL); |
1628 | XGetICValues (Input_Context, XNStatusAttributes, status_attr, NULL); |
1638 | XGetICValues (Input_Context, XNStatusAttributes, status_attr, NULL); |
1629 | XFree (status_attr); |
1639 | XFree (status_attr); |
1630 | |
1640 | |
1631 | im_set_preedit_area (preedit_rect, status_rect, *needed_rect); |
1641 | im_set_preedit_area (preedit_rect, status_rect, *needed_rect); |
1632 | XFree (needed_rect); |
1642 | XFree (needed_rect); |
1633 | |
1643 | |
1634 | preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); |
1644 | preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); |
1635 | status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL); |
1645 | status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL); |
1636 | |
1646 | |
1637 | XSetICValues (Input_Context, |
1647 | XSetICValues (Input_Context, |
1638 | XNPreeditAttributes, preedit_attr, |
1648 | XNPreeditAttributes, preedit_attr, |
1639 | XNStatusAttributes, status_attr, |
1649 | XNStatusAttributes, status_attr, |
1640 | NULL); |
1650 | NULL); |
1641 | |
1651 | |
|
|
1652 | XFree (status_attr); |
|
|
1653 | } |
|
|
1654 | |
1642 | XFree (preedit_attr); |
1655 | XFree (preedit_attr); |
1643 | XFree (status_attr); |
|
|
1644 | } |
1656 | } |
1645 | #endif /* USE_XIM */ |
1657 | #endif /* USE_XIM */ |
1646 | |
1658 | |
1647 | /*----------------------- end-of-file (C source) -----------------------*/ |
1659 | /*----------------------- end-of-file (C source) -----------------------*/ |