winemac.drv: Improve positioning of IME client window based on caret

Aric Stewart aric at codeweavers.com
Wed Feb 19 20:18:12 CST 2014


On 2014/02/20 7:46, Ken Thomases wrote:
> On Feb 19, 2014, at 4:19 PM, Aric Stewart wrote:
> 
>> humm, so how should i determine line height?
> 
> I don't think you can.  It's not a well-formed concept.  Windows don't have any inherent line height property (directly or indirectly).
> 
> Have you tried the GetGUIThreadInfo() approach and rcCaret?  You're trying to fix the case when using GetCaretPos() but maybe we shouldn't be using that.
> 
> If you're thinking forward to IMC_SETCANDIDATEPOS, then a horrible kludge might be to return a rect whose bottom left is at the specified point and which extends up and to the right to the screen boundaries.  The idea is to try to make the input method position its candidate window so its top-left is at the specified point.  It will likely align its left side with the left side of the character rect we return (for left-to-right languages, at least) and, by taking up the area of the screen above and to the right of that point, you force the candidate window to be below the rect.

I am thinking forward to the IMC_SETCANDIDATEPOS implementation, but on the way found that our caret pos version was seriously bad and was working on that first.

The issue with simply kludging the rect like that is that it appears that the caret position that we are given is in the middle of the line (not the bottom where it would be useful)  so we end up clipping the bottom half of the composition string with the selection dialog. Again lending to the need to be able to at least guess at a line height to shift the box down by. 

-aric



More information about the wine-devel mailing list