NSButton is ignoring clicks that come in too close together.
If I click slowly, all clicks are acknowledged, but if I start to speed up, at a certain point it will stop sending mouseDown: events anymore. If I then slow it down, at a certain point all clicks begin to propogate again.
For a couple of the buttons in this app, hammering will happen, and there's no reason it shouldn't be allowed.
I've tried setIgnoresMultiClick:, but it doesn't change the behavior.
I tried subclassing NSButton, overriding mouseDown:, recreating a duplicate of the event object except with the button count set to 1.
Still no dice.
Anyone know the trick here?
SEMI-Resolved (...though w/ drawbacks).
There are probably a half dozen ways to do this, but here's how I enabled button hammering...
@interface HammerClickWindow : NSWindow {;;}
@end
@implementation HammerClickWindow
- (void)sendEvent:(NSEvent *)event
{
if ( event.type == NSLeftMouseDown )
{
[super sendEvent:[NSEvent mouseEventWithType:event.type location:event.locationInWindow modifierFlags:event.modifierFlags timestamp:event.timestamp windowNumber:event.windowNumber context:event.context eventNumber:event.eventNumber clickCount:1 pressure:event.pressure]];
}
}
@end
If anyone knows how to do this where it (A) doesn't effect 100% of mouse downs in a window, and (B) can effect only specific buttons... that'd be great.