mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-22 22:19:21 +00:00
correctly set global autotype on initailizer
This commit is contained in:
@@ -25,7 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (readonly) BOOL hidden; /// If set to YES, MacPass was hidden when autotype was initiated
|
||||
@property (readonly) BOOL isSelfTargeting; /// If MacPass should autotype to itself, YES, otherwise NO
|
||||
@property (readonly) NSString *overrideSequence; /// If set, this sequence is used for running the command regardless of the matched one
|
||||
@property (readonly) BOOL globalAutotype;
|
||||
@property (readonly) BOOL globalAutotype; /// YES, if autotype is run as global autotype, NO otherwise
|
||||
|
||||
+ (instancetype)environmentWithTargetApplication:(NSRunningApplication * _Nullable)targetApplication entry:(KPKEntry * _Nullable)entry overrideSequence:(NSString * _Nullable)overrideSequence;
|
||||
|
||||
|
||||
@@ -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