mirror of
https://github.com/MacPass/MacPass.git
synced 2026-02-01 11:28:15 +00:00
Fixed autotype regression preventing self-autotyping. Added re-hiding for special placeholders
This commit is contained in:
@@ -190,7 +190,10 @@ static MPAutotypeDaemon *_sharedInstance;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)_runAutotypeWithEnvironment:(MPAutotypeEnvironment *)env {
|
- (void)_runAutotypeWithEnvironment:(MPAutotypeEnvironment *)env {
|
||||||
|
if(env.isSelfTargeting) {
|
||||||
|
return; // we do not want to target ourselves
|
||||||
|
}
|
||||||
|
|
||||||
if(!self.hasNecessaryAutotypePermissions) {
|
if(!self.hasNecessaryAutotypePermissions) {
|
||||||
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
NSUserNotification *notification = [[NSUserNotification alloc] init];
|
||||||
notification.title = NSLocalizedString(@"AUTOTYPE_NOTIFICATION_PERMISSIONS_MISSING_TITLE", "Title for autotype feedback on missing permissions");
|
notification.title = NSLocalizedString(@"AUTOTYPE_NOTIFICATION_PERMISSIONS_MISSING_TITLE", "Title for autotype feedback on missing permissions");
|
||||||
@@ -329,6 +332,10 @@ static MPAutotypeDaemon *_sharedInstance;
|
|||||||
usleep(globalDelay*NSEC_PER_USEC);
|
usleep(globalDelay*NSEC_PER_USEC);
|
||||||
}
|
}
|
||||||
[command execute];
|
[command execute];
|
||||||
|
/* re-hide after every command since this might have put us back up front */
|
||||||
|
if(environment.hidden) {
|
||||||
|
[NSApplication.sharedApplication hide:nil];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isSelfTargeting {
|
- (BOOL)isSelfTargeting {
|
||||||
return NSRunningApplication.currentApplication.processIdentifier != _pid;
|
return NSRunningApplication.currentApplication.processIdentifier == _pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *)_infoDictionaryForApplication:(NSRunningApplication *)application {
|
- (NSDictionary *)_infoDictionaryForApplication:(NSRunningApplication *)application {
|
||||||
|
|||||||
Reference in New Issue
Block a user