mirror of https://github.com/fltk/fltk
MacOS: account for GUI rescaling in support of text input methods.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12927 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
ce71c4b679
commit
2576f57384
|
@ -2581,8 +2581,12 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
|
|||
win = win->window();
|
||||
}
|
||||
// Convert the rect to screen coordinates
|
||||
glyphRect.origin.y = wfocus->h() - glyphRect.origin.y;
|
||||
float s = Fl_Graphics_Driver::default_driver().scale();
|
||||
glyphRect.origin.x *= s;
|
||||
glyphRect.origin.y *= s;
|
||||
glyphRect.origin.y = wfocus->h()*s - glyphRect.origin.y;
|
||||
glyphRect.origin = [(FLWindow*)[self window] convertBaseToScreen:glyphRect.origin];
|
||||
glyphRect.size.height *= s;
|
||||
if (actualRange) *actualRange = aRange;
|
||||
fl_unlock_function();
|
||||
return glyphRect;
|
||||
|
|
Loading…
Reference in New Issue