Improve OS X IME candidate window placement

This commit is contained in:
Yoshiki Shibukawa 2016-02-26 10:46:49 +01:00 committed by Camilla Berglund
parent 59dbd3b6ce
commit e7bb03d8e7
2 changed files with 5 additions and 1 deletions

View File

@ -230,6 +230,7 @@ skills.
- SephiRok
- Steve Sexton
- Systemcluster
- Yoshiki Shibukawa
- Dmitri Shuralyov
- Daniel Skorupski
- Bradley Smith

View File

@ -662,7 +662,10 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
- (NSRect)firstRectForCharacterRange:(NSRange)range
actualRange:(NSRangePointer)actualRange
{
return NSMakeRect(0, 0, 0, 0);
int x, y;
_glfwPlatformGetWindowPos(window, &x, &y);
const NSRect contentRect = [window->ns.view frame];
return NSMakeRect(x, transformY(y+contentRect.size.height), 0, 0);
}
- (void)insertText:(id)string replacementRange:(NSRange)replacementRange