I wanted to implement a component to cancel an operation if the opposite mouse button was clicked while the main click hasn’t finished yet (without drag).
My initial idea was to save which button was clicked in mouseDown and then check if it’s still the same in mouseUp, but mouseUp just gives you the one you started with in mouseDown.
Then I thought like “ok, technically that makes sense because now you press 2 buttons at the same time, so ofc it still has to send a mouseUp for the one you started with”.
So I put a jassert into mouseDown trying to make it breakpoint on right clicks and I performed a left-then-right click, which failed to trigger the jassert, showing that a Component can not have another mouseDown if it didn’t have the mouseUp from the current mouseDown yet. But that means I can neither use the mouseUp nor the mouseDown method to find out if both buttons are clicked rn, unless I am misunderstanding something or overlooking a feature here.
I can understand if someone in the past decided that it would be safer to not let a component be down before having been up again to prevent certain events from being weird, like parameter gestures. But it’s also possible for mousewheel events to happen during a drag, which has the same problem, so it would only be consistent if multiple clicks at once were also possible.