Tweak invalid filename handling. Use it for manual exports also. Allow drag exports...
[enjoyable.git] / NJOutputMouseMove.m
index bca5d2d..884a3d3 100644 (file)
 
 @implementation NJOutputMouseMove
 
--(BOOL) isContinuous {
-    return YES;
-}
-
 + (NSString *)serializationCode {
     return @"mouse move";
 }
 
 + (NJOutput *)outputDeserialize:(NSDictionary *)serialization
                   withMappings:(NSArray *)mappings {
-       NJOutputMouseMove *output = [[NJOutputMouseMove alloc] init];
+    NJOutputMouseMove *output = [[NJOutputMouseMove alloc] init];
     output.axis = [serialization[@"axis"] intValue];
     output.speed = [serialization[@"speed"] floatValue];
     if (!output.speed)
         output.speed = 4;
-       return output;
+    return output;
+}
+
+- (BOOL)isContinuous {
+    return YES;
 }
 
 - (BOOL)update:(NJDeviceController *)jc {
     CGEventSetType(move, kCGEventMouseMoved);
     CGEventSetIntegerValueField(move, kCGMouseEventDeltaX, (int)dx);
     CGEventSetIntegerValueField(move, kCGMouseEventDeltaY, (int)dy);
-    
-    if (jc.frontWindowOnly) {
-        ProcessSerialNumber psn;
-        GetFrontProcess(&psn);
-        CGEventPostToPSN(&psn, move);
-    }
-    else {
-        CGEventPost(kCGHIDEventTap, move);
-    }
-    
+    CGEventPost(kCGHIDEventTap, move);
     CFRelease(move);
     return YES;
 }