Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
changeset: 4434:4e5dd7dc58cd
Browse files Browse the repository at this point in the history
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
  • Loading branch information
slouken committed Apr 16, 2010
1 parent aaccd99 commit 9d519f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/video/cocoa/SDL_cocoakeyboard.m
Expand Up @@ -155,7 +155,9 @@ - (void) unmarkText

- (NSRect) firstRectForCharacterRange: (NSRange) theRange
{
float windowHeight = [[self window] frame].size.height;
NSWindow *window = [self window];
NSRect contentRect = [window contentRectForFrameRect: [window frame]];
float windowHeight = contentRect.size.height;
NSRect rect = NSMakeRect(_inputRect.x, windowHeight - _inputRect.y - _inputRect.h,
_inputRect.w, _inputRect.h);

Expand Down

0 comments on commit 9d519f2

Please sign in to comment.