Mercurial > sdl-ios-xcode
diff src/video/quartz/SDL_QuartzWindow.m @ 4070:b8f2db95145e SDL-1.2
Patch from Christian Walther
Yes, the idea to use a cursor rectangle instead of [NSCursor set] has occurred
to me too, and it does seem to be the most elegant way. Here's my attempt at an
implementation
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 15 Jul 2007 15:58:00 +0000 |
parents | ef4a796e7f24 |
children | a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzWindow.m Sun Jul 15 14:14:45 2007 +0000 +++ b/src/video/quartz/SDL_QuartzWindow.m Sun Jul 15 15:58:00 2007 +0000 @@ -22,6 +22,7 @@ #include "SDL_config.h" #include "SDL_QuartzVideo.h" +#include "SDL_QuartzWM.h" #include "SDL_QuartzWindow.h" /* @@ -217,3 +218,15 @@ } @end + +@implementation SDL_QuartzView + +- (void)resetCursorRects +{ + SDL_Cursor *sdlc = SDL_GetCursor(); + if (sdlc != NULL && sdlc->wm_cursor != NULL) { + [self addCursorRect: [self visibleRect] cursor: sdlc->wm_cursor->nscursor]; + } +} + +@end