#include "veapplication.h" bool VEApplication::macEventFilter(EventHandlerCallRef callRef, EventRef event) { static NSEvent *lastEvent = 0; NSEvent *e = reinterpret_cast(event); if (e == lastEvent) return false; if ([e type] == NSMouseMoved) { NSEvent *newEvent = [NSEvent mouseEventWithType:[e type] location:NSMakePoint([e locationInWindow].x+10, [e locationInWindow].y+10) modifierFlags:[e modifierFlags] timestamp:[e timestamp] windowNumber:[e windowNumber] context:[e context] eventNumber:[e eventNumber] clickCount:[e clickCount] pressure:[e pressure]]; printf("posting moveEvent\n"); lastEvent = newEvent; [NSApp postEvent:newEvent atStart:NO]; return true; } /* else if ([e type] == NSMouseEntered || [e type] == NSMouseExited) { NSEvent *newEvent = [NSEvent enterExitEventWithType:[e type] location:NSMakePoint([e locationInWindow].x+10, [e locationInWindow].y+10) modifierFlags:[e modifierFlags] timestamp:[e timestamp] windowNumber:[e windowNumber] context:[e context] eventNumber:[e eventNumber] trackingNumber:[e trackingNumber] userData:[e userData]]; printf("posting enterEvent\n"); lastEvent = newEvent; [NSApp postEvent:newEvent atStart:NO]; return true; } */ return false; }