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

Aric Stewart aric at codeweavers.com
Wed Feb 19 21:00:11 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.
> 
> -Ken
> 

GetGUIThreadInfo is totally the correct way to go. It is giving me correct caret rects for both notepad and the Japanese applications I am trying to fix. I can worry less about the not about caret insertion points because i do not care about the width, just the height and position. so a width of 1 is fine.

I will resubmit the patch with this logic.

Thanks!
-aric



More information about the wine-devel mailing list