Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+
authorJørgen P. Tjernø
Mon, 24 Feb 2014 16:42:08 -0800
changeset 8250e671ec6b22dd
parent 8249 294f28074ecc
child 8251 833eae6867c2
Mac: Fix inconsistent repeat of SDL_TEXTINPUT events on 10.7+

Due to the new "tap and hold" IME in Mountain Lion and above, we were getting
inconsistent repeat of SDL_TEXTINPUT events. Disabling that functionality (since
you can't see the popover anyway) solves this.

Bug: https://bugzilla.libsdl.org/show_bug.cgi?id=2387
src/video/cocoa/SDL_cocoaevents.m
     1.1 --- a/src/video/cocoa/SDL_cocoaevents.m	Mon Feb 24 18:57:22 2014 -0300
     1.2 +++ b/src/video/cocoa/SDL_cocoaevents.m	Mon Feb 24 16:42:08 2014 -0800
     1.3 @@ -271,7 +271,10 @@
     1.4              CreateApplicationMenus();
     1.5          }
     1.6          [NSApp finishLaunching];
     1.7 -        NSDictionary *appDefaults = [NSDictionary dictionaryWithObject:@"NO" forKey:@"AppleMomentumScrollSupported"];
     1.8 +        NSDictionary *appDefaults = @{
     1.9 +            @"AppleMomentumScrollSupported": @NO,
    1.10 +            @"ApplePressAndHoldEnabled": @NO,
    1.11 +        };
    1.12          [[NSUserDefaults standardUserDefaults] registerDefaults:appDefaults];
    1.13  
    1.14      }