mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-24 11:09:50 +00:00
correctly set global autotype on initailizer
This commit is contained in:
@@ -20,14 +20,16 @@
|
||||
- (instancetype)initWithTargetApplication:(NSRunningApplication *)targetApplication entry:(KPKEntry *)entry overrideSequence:(NSString *)overrdieSequence {
|
||||
self = [super init];
|
||||
if(self) {
|
||||
_globalAutotype = NO;
|
||||
_preferredEntry = entry;
|
||||
_hidden = NSRunningApplication.currentApplication.isHidden;
|
||||
_overrideSequence = [overrdieSequence copy];
|
||||
/* capture the front most application if no one was supplied */
|
||||
if(nil == targetApplication) {
|
||||
_globalAutotype = YES;
|
||||
targetApplication = NSWorkspace.sharedWorkspace.frontmostApplication;
|
||||
}
|
||||
if(!targetApplication) {
|
||||
if(nil == targetApplication) {
|
||||
_pid = -1;
|
||||
_windowTitle = @"";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user