On 2014/02/20 14:22, Ken Thomases wrote:
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?
I have failed to find a right-to-left input method that makes use of the candidate window stuff. So I have not been able to investigate that.
The caret window size does appear to be pretty logical. (always about 1 pixel but still logical) I was just not relying on it, mostly because of the comment in the MSDN page that made me worry that it could potentially be an invalid rect (right side less than left) in some cases. But rereading it I do not thing that is what is being implied. I also never saw that to be the case.
-aric