Cleanup secure keyboard entry logging

This commit is contained in:
Kovid Goyal 2021-04-22 09:41:01 +05:30
parent 6cee6b6429
commit f3c559ea13
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -653,17 +653,17 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
}
- (void)update {
debug_key("Update secure keyboard entry. desired=%d active=%d",
debug_key("Update secure keyboard entry. desired=%d active=%d\n",
(int)self.isDesired, (int)[NSApp isActive]);
const BOOL secure = self.isDesired && [self allowed];
if (secure && _count > 0) {
debug_key("Want to turn on secure input but it's already on");
debug_key("Want to turn on secure input but it's already on\n");
return;
}
if (!secure && _count == 0) {
debug_key("Want to turn off secure input but it's already off");
debug_key("Want to turn off secure input but it's already off\n");
return;
}
@ -685,7 +685,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
_count -= 1;
}
}
debug_key("After: IsSecureEventInputEnabled returns %d", (int)self.isEnabled);
debug_key("After: IsSecureEventInputEnabled returns %d\n", (int)self.isEnabled);
}
@end