ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.219 by root, Sat Feb 11 02:28:19 2006 UTC vs.
Revision 1.220 by root, Sat Feb 11 10:53:37 2006 UTC

1119 if (pixmap) 1119 if (pixmap)
1120 scr_touch (false); 1120 scr_touch (false);
1121#endif 1121#endif
1122 1122
1123#ifdef USE_XIM 1123#ifdef USE_XIM
1124 IMSetStatusPosition (); 1124 IMSetPosition ();
1125#endif 1125#endif
1126} 1126}
1127 1127
1128/* 1128/*
1129 * Set the width/height of the vt window in characters. Units are pixels. 1129 * Set the width/height of the vt window in characters. Units are pixels.
1526 preedit_attr, 1526 preedit_attr,
1527 status_attr ? XNStatusAttributes : NULL, 1527 status_attr ? XNStatusAttributes : NULL,
1528 status_attr, NULL); 1528 status_attr, NULL);
1529 1529
1530 if (preedit_attr) XFree (preedit_attr); 1530 if (preedit_attr) XFree (preedit_attr);
1531 if (status_attr) XFree (status_attr); 1531 if (status_attr) XFree (status_attr);
1532 if (fs) XFreeFontSet (dpy, fs); 1532 if (fs) XFreeFontSet (dpy, fs);
1533 1533
1534 if (Input_Context == NULL) 1534 if (Input_Context == NULL)
1535 { 1535 {
1536 rxvt_warn ("failed to create input context, continuing without XIM.\n"); 1536 rxvt_warn ("failed to create input context, continuing without XIM.\n");
1537 im_destroy (); 1537 im_destroy ();
1542 // unfortunately, only the focus window is used by XIM, hard to fix 1542 // unfortunately, only the focus window is used by XIM, hard to fix
1543 if (!XGetICValues (Input_Context, XNFilterEvents, &vt_emask_xim, NULL)) 1543 if (!XGetICValues (Input_Context, XNFilterEvents, &vt_emask_xim, NULL))
1544 vt_select_input (); 1544 vt_select_input ();
1545#endif 1545#endif
1546 1546
1547 if (input_style & XIMPreeditArea)
1548 IMSetStatusPosition (); 1547 IMSetPosition ();
1549 1548
1550 return true; 1549 return true;
1551} 1550}
1552 1551
1553void 1552void
1611 SET_LOCALE (locale); 1610 SET_LOCALE (locale);
1612#endif 1611#endif
1613} 1612}
1614 1613
1615void 1614void
1616rxvt_term::IMSetStatusPosition () 1615rxvt_term::IMSetPosition ()
1617{ 1616{
1618 XRectangle preedit_rect, status_rect, *needed_rect; 1617 XRectangle preedit_rect, status_rect, *needed_rect;
1619 XVaNestedList preedit_attr, status_attr; 1618 XVaNestedList preedit_attr, status_attr;
1620 1619
1621 if (!Input_Context 1620 if (!Input_Context
1622 || !focus 1621 || !focus
1623 || !(input_style & XIMPreeditArea) 1622 || !(input_style & (XIMPreeditArea | XIMPreeditPosition))
1624 || !IMisRunning ()) 1623 || !IMisRunning ())
1625 return; 1624 return;
1626 1625
1627 /* Getting the necessary width of preedit area */ 1626 /* Getting the necessary width of preedit area */
1628 status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL); 1627 status_attr = XVaCreateNestedList (0, XNAreaNeeded, &needed_rect, NULL);
1631 1630
1632 im_set_preedit_area (preedit_rect, status_rect, *needed_rect); 1631 im_set_preedit_area (preedit_rect, status_rect, *needed_rect);
1633 XFree (needed_rect); 1632 XFree (needed_rect);
1634 1633
1635 preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL); 1634 preedit_attr = XVaCreateNestedList (0, XNArea, &preedit_rect, NULL);
1636 status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL); 1635 status_attr = XVaCreateNestedList (0, XNArea, &status_rect, NULL);
1637 1636
1638 XSetICValues (Input_Context, 1637 XSetICValues (Input_Context,
1639 XNPreeditAttributes, preedit_attr, 1638 XNPreeditAttributes, preedit_attr,
1640 XNStatusAttributes, status_attr, NULL); 1639 XNStatusAttributes, status_attr,
1640 NULL);
1641 1641
1642 XFree (preedit_attr); 1642 XFree (preedit_attr);
1643 XFree (status_attr); 1643 XFree (status_attr);
1644} 1644}
1645#endif /* USE_XIM */ 1645#endif /* USE_XIM */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines