On Feb 19, 2014, at 11:19 PM, Aric Stewart wrote:
On 2014/02/20 14:14, Ken Thomases wrote:
On Feb 19, 2014, at 9:00 PM, Aric Stewart wrote:
gti.rcCaret.right = gti.rcCaret.left + 1;
Out of curiosity, was there a problem with leaving the rectangle with its original width? I wonder if, for an input method operating in right-to-left mode, it would be good to have the right edge of the caret rect so the candidate window can be aligned underneath it. (Presumably, the input method would take care of that automatically, as it just thinks of this rect as the character rect and, for right-to-left input, the right edge would be the beginning.)
Otherwise, this looks good to me.
No strong reason other than to have a known width, as the mac at least appears to center the candidate window above/below the point.
I can leave the returned width if you feel that to be better.
Do you have the ability to test an input method with right-to-left input with an app that's known to use this code path? Also, have you inspected the caret width to know if it's supplying a sensible width?
-Ken