macOS: Persist "Secure Keyboard Entry" across restarts to match the behavior of Terminal.app
Fixes #4471
This commit is contained in:
parent
ac0c10c170
commit
356897a32d
@ -79,6 +79,10 @@ Detailed list of changes
|
||||
- macOS: Allow opening text files, images and directories with kitty when
|
||||
launched using "Open with" in Finder (:iss:`4460`)
|
||||
|
||||
- macOS: Persist "Secure Keyboard Entry" across restarts to match the behavior
|
||||
of Terminal.app (:iss:`4471`)
|
||||
|
||||
|
||||
0.24.1 [2022-01-06]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@ -1586,6 +1586,8 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
||||
if (self != nil) {
|
||||
glfw_window = initWindow;
|
||||
self.tabbingMode = NSWindowTabbingModeDisallowed;
|
||||
SecureKeyboardEntryController *k = [SecureKeyboardEntryController sharedInstance];
|
||||
if (!k.isDesired && [[NSUserDefaults standardUserDefaults] boolForKey:@"SecureKeyboardEntry"]) [k toggle];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -1612,7 +1614,9 @@ void _glfwPlatformUpdateIMEState(_GLFWwindow *w, const GLFWIMEUpdateEvent *ev) {
|
||||
|
||||
- (void)toggleSecureInput:(id)sender {
|
||||
(void)sender;
|
||||
[[SecureKeyboardEntryController sharedInstance] toggle];
|
||||
SecureKeyboardEntryController *k = [SecureKeyboardEntryController sharedInstance];
|
||||
[k toggle];
|
||||
[[NSUserDefaults standardUserDefaults] setBool:k.isDesired forKey:@"SecureKeyboardEntry"];
|
||||
}
|
||||
|
||||
- (BOOL)canBecomeKeyWindow
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user