changeset: 4434:4e5dd7dc58cd
authorSam Lantinga <slouken@libsdl.org>
Thu, 15 Apr 2010 22:27:50 -0700
changeset 4436d3c193100522
parent 4435 e953700da4ca
child 4437 25e45611fa3d
changeset: 4434:4e5dd7dc58cd
tag: tip
user: Jjgod Jiang <gzjjgod@gmail.com>
date: Fri Apr 16 13:20:33 2010 +0800
summary: Fix window height calculation for text input rect
src/video/cocoa/SDL_cocoakeyboard.m
     1.1 --- a/src/video/cocoa/SDL_cocoakeyboard.m	Thu Apr 15 22:27:01 2010 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoakeyboard.m	Thu Apr 15 22:27:50 2010 -0700
     1.3 @@ -155,7 +155,9 @@
     1.4  
     1.5  - (NSRect) firstRectForCharacterRange: (NSRange) theRange
     1.6  {
     1.7 -    float windowHeight = [[self window] frame].size.height;
     1.8 +    NSWindow *window = [self window];
     1.9 +    NSRect contentRect = [window contentRectForFrameRect: [window frame]];
    1.10 +    float windowHeight = contentRect.size.height;
    1.11      NSRect rect = NSMakeRect(_inputRect.x, windowHeight - _inputRect.y - _inputRect.h,
    1.12                               _inputRect.w, _inputRect.h);
    1.13