Removed currently unused AutotypeExecution context.

This commit is contained in:
Michael Starke
2018-12-07 13:43:15 +01:00
parent 713455bacc
commit 9f8617372f
8 changed files with 3 additions and 64 deletions

View File

@@ -25,7 +25,6 @@
#import "MPDocumentWindowController.h"
#import "MPAutotypeCommand.h"
#import "MPAutotypeContext.h"
#import "MPAutotypeExecutionContext.h"
#import "MPAutotypePaste.h"
#import "MPPasteBoardController.h"
#import "MPSettingsHelper.h"
@@ -53,7 +52,6 @@ NSString *const kMPProcessIdentifierKey = @"kMPProcessIdentifierKey";
@property (copy) NSString *targetWindowTitle; // The title of the window that we are targeting
@property (strong) NSRunningApplication *previousApplication; // The application that was active before we got invoked
@property (assign) NSTimeInterval userActionRequested;
@property (strong, readwrite) MPAutotypeExecutionContext *executionContext;
@end
@@ -317,17 +315,15 @@ static MPAutotypeDaemon *_sharedInstance;
if([self _orderApplicationToFront:self.targetPID]) {
/* Sleep a bit after the app was activated */
/* TODO - we can use a saver way and use a notification to check if the app actally was activated */
/* TODO - we might be able to a notification to check if the app actally was activated instead of guessing a waiting time */
usleep(1 * NSEC_PER_MSEC);
}
self.executionContext = [[MPAutotypeExecutionContext alloc] initWithTargetPid:self.targetPID];
for(MPAutotypeCommand *command in [MPAutotypeCommand commandsForContext:context]) {
/* dispatch commands to main thread since most of them translate key events which is disallowed on background thread */
dispatch_async(dispatch_get_main_queue(), ^{
[command execute];
});
}
self.executionContext = nil;
}
#pragma mark -