--- modules/highgui/src/window_cocoa.mm.orig 2023-09-19 07:42:42.000000000 -0400 +++ modules/highgui/src/window_cocoa.mm 2023-09-19 07:43:37.000000000 -0400 @@ -899,19 +899,7 @@ mp.y *= (imageSize.height / std::max(viewSize.height, 1.)); mp.x *= (imageSize.width / std::max(viewSize.width, 1.)); - if( [event type] == NSEventTypeScrollWheel ) { - if( event.hasPreciseScrollingDeltas ) { - mp.x = int(event.scrollingDeltaX); - mp.y = int(event.scrollingDeltaY); - } else { - mp.x = int(event.scrollingDeltaX / 0.100006); - mp.y = int(event.scrollingDeltaY / 0.100006); - } - if( mp.x && !mp.y && CV_EVENT_MOUSEWHEEL == type ) { - type = CV_EVENT_MOUSEHWHEEL; - } - mouseCallback(type, mp.x, mp.y, flags, mouseParam); - } else if( mp.x >= 0 && mp.y >= 0 && mp.x < imageSize.width && mp.y < imageSize.height ) { + if( mp.x >= 0 && mp.y >= 0 && mp.x < imageSize.width && mp.y < imageSize.height ) { mouseCallback(type, mp.x, mp.y, flags, mouseParam); } @@ -937,7 +925,6 @@ if([event type] == NSLeftMouseDragged) {[self cvSendMouseEvent:event type:CV_EVENT_MOUSEMOVE flags:flags | CV_EVENT_FLAG_LBUTTON];} if([event type] == NSRightMouseDragged) {[self cvSendMouseEvent:event type:CV_EVENT_MOUSEMOVE flags:flags | CV_EVENT_FLAG_RBUTTON];} if([event type] == NSOtherMouseDragged) {[self cvSendMouseEvent:event type:CV_EVENT_MOUSEMOVE flags:flags | CV_EVENT_FLAG_MBUTTON];} - if([event type] == NSEventTypeScrollWheel) {[self cvSendMouseEvent:event type:CV_EVENT_MOUSEWHEEL flags:flags ];} } -(void)scrollWheel:(NSEvent *)theEvent {