diff options
| author | Manolo Gouy <Manolo> | 2018-05-23 16:19:37 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-05-23 16:19:37 +0000 |
| commit | 2576f573846916a8cd7517c9b4e7375773d71927 (patch) | |
| tree | c1acc453f09be40310bb9a364d8a5aebf240645f /src | |
| parent | ce71c4b679b7afdb07de1133d0c600051e2601f6 (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index a034239b9..5faf8fe3e 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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; |
