The way to get beginGestureWithEvent / endGestureWithEvent if the window is not in front

Is there any way to get

- (void)beginGestureWithEvent:(NSEvent *)event

and

- (void)endGestureWithEvent:(NSEvent *)event

triggers a view even if the containing window is in the background? It seems that these calls are only delivered to windows if they are key.

+5
source share
2 answers

In general, no. In Leopard and SnowLeopard gestures are designed to set only the foreground. As you have discovered, the window server does not even send gesture events to background applications.

, , NS. , , .

, , , .

+2

:

NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways

... mouseEntered:

, .

0

All Articles