UnnaturalScrollWheels icon indicating copy to clipboard operation
UnnaturalScrollWheels copied to clipboard

Not setting property isDirectionInvertedFromDevice

Open Tom-Evers opened this issue 7 months ago • 1 comments

It seems that inverting the scroll direction doesn't properly set the property isDirectionInvertedFromDevice for the scrolling event. I think it used to, but I don't know when exactly it broke. My guess is it's due to an OS update (currently running Sonoma 14.5).

Some context: I'm creating an application that has some elements that need to ignore natural scrolling, but as it is now I can't distinguish between my naturally scrolling trackpad and my "unnaturally" scrolling scroll wheel. This used to work:

@implementation MyOwnNSView

- (void)scrollWheel:(NSEvent*)event {
    const bool natural = [event isDirectionInvertedFromDevice];
    ...
}

@end

Tom-Evers avatar Jul 02 '24 08:07 Tom-Evers