Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzVideo.m @ 4123:9d90d7765fa7 SDL-1.2
Guillaume Borios fixed bug #508
When unicode translation is ON, pressing the escape key raise an NSBeep()
because the NSTextView interprets the key as a special command (in that case
impossible to interpret)... The NSTextView instance should replaced by
something subclassed so that doCommandBySelector: does nothing.
Example code :
@interface SDLTranslatorResponder : NSTextView
{
}
- (void) doCommandBySelector:(SEL)myselector;
@end
@implementation SDLTranslatorResponder
- (void) doCommandBySelector:(SEL) myselector {}
@end
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 29 Dec 2007 21:31:26 +0000 |
parents | fedb379bedd0 |
children | 568c9b3c0167 |
comparison
equal
deleted
inserted
replaced
4122:cb7b118b400a | 4123:9d90d7765fa7 |
---|---|
40 { | 40 { |
41 _frame = frame; | 41 _frame = frame; |
42 } | 42 } |
43 @end | 43 @end |
44 | 44 |
45 @interface SDLTranslatorResponder : NSTextView | |
46 { | |
47 } | |
48 - (void) doCommandBySelector:(SEL)myselector; | |
49 @end | |
50 | |
51 @implementation SDLTranslatorResponder | |
52 - (void) doCommandBySelector:(SEL) myselector {} | |
53 @end | |
54 | |
45 | 55 |
46 /* Bootstrap functions */ | 56 /* Bootstrap functions */ |
47 static int QZ_Available (); | 57 static int QZ_Available (); |
48 static SDL_VideoDevice* QZ_CreateDevice (int device_index); | 58 static SDL_VideoDevice* QZ_CreateDevice (int device_index); |
49 static void QZ_DeleteDevice (SDL_VideoDevice *device); | 59 static void QZ_DeleteDevice (SDL_VideoDevice *device); |
201 /* Set misc globals */ | 211 /* Set misc globals */ |
202 current_grab_mode = SDL_GRAB_OFF; | 212 current_grab_mode = SDL_GRAB_OFF; |
203 cursor_should_be_visible = YES; | 213 cursor_should_be_visible = YES; |
204 cursor_visible = YES; | 214 cursor_visible = YES; |
205 current_mods = 0; | 215 current_mods = 0; |
206 field_edit = [[NSTextView alloc] initWithFrame:r]; | 216 field_edit = [[SDLTranslatorResponder alloc] initWithFrame:r]; |
207 | 217 |
208 if ( Gestalt(gestaltSystemVersion, &system_version) != noErr ) | 218 if ( Gestalt(gestaltSystemVersion, &system_version) != noErr ) |
209 system_version = 0; | 219 system_version = 0; |
210 | 220 |
211 /* register for sleep notifications so wake from sleep generates SDL_VIDEOEXPOSE */ | 221 /* register for sleep notifications so wake from sleep generates SDL_VIDEOEXPOSE */ |