Disable NSAutoFillHeuristicController on spec

This commit is contained in:
Kovid Goyal
2025-12-18 10:16:59 +05:30
parent 8bf2f439c8
commit 99b1eca3c8

View File

@@ -971,13 +971,16 @@ int _glfwPlatformInit(bool *supports_window_occlusion)
if (_glfw.hints.init.ns.chdir) if (_glfw.hints.init.ns.chdir)
changeToResourcesDirectory(); changeToResourcesDirectory();
NSDictionary* defaults = @{ [[NSUserDefaults standardUserDefaults] registerDefaults:@{
// Press and Hold prevents some keys from emitting repeated characters // Press and Hold prevents some keys from emitting repeated characters
@"ApplePressAndHoldEnabled": @NO, @"ApplePressAndHoldEnabled": @NO,
// Dont generate openFile events from command line arguments // Dont generate openFile events from command line arguments
@"NSTreatUnknownArgumentsAsOpen": @"NO", @"NSTreatUnknownArgumentsAsOpen": @"NO",
}; // This Tahoe nonsense causes slowdowns in some situations, see for example:
[[NSUserDefaults standardUserDefaults] registerDefaults:defaults]; // https://issues.chromium.org/issues/452372350 it doesnt affect
// autofill via Edit->Autofill
@"NSAutoFillHeuristicControllerEnabled" : @NO,
}];
NSUserDefaults *apple_settings = [[NSUserDefaults alloc] initWithSuiteName:@"com.apple.symbolichotkeys"]; NSUserDefaults *apple_settings = [[NSUserDefaults alloc] initWithSuiteName:@"com.apple.symbolichotkeys"];
[apple_settings addObserver:_glfw.ns.helper [apple_settings addObserver:_glfw.ns.helper