CGPoint mouseLocation = CGEventGetLocation(event);
double targetedPSN = CGEventGetDoubleValueField(event, kCGEventTargetProcessSerialNumber);
NSMutableData *data = [NSMutableData dataWithCapacity:0];
float x = mouseLocation.x;
float y = mouseLocation.y;
[data appendBytes:&(x) length:sizeof(float)];
[data appendBytes:&(y) length:sizeof(float)];
[data appendBytes:&(targetedPSN) length:sizeof(double)];
NSArray *arguments = [[NSArray alloc] initWithObjects:data, nil];
[data release];
> double targetedPSN = CGEventGetDoubleValueField(event, kCGEventTargetProcessSerialNumber);
> Am I doing something wrong ?
Well, I don't have any insight into which process is targeted for clicks on background apps, but you should be using int64_t and CGEventGetIntegerValueField() for kCGEventTargetProcessSerialNumber.
Regards,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartz-dev mailing list (Quart...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartz-dev/quartz-dev-garchive-50095%40googlegroups.com
This email sent to quartz-dev-g...@googlegroups.com