https://bugs.documentfoundation.org/show_bug.cgi?id=152406
--- Comment #31 from Patrick Luby <[email protected]> --- (In reply to Telesto from comment #30) > FWIW. Some pointers. Setting the scroll factor from 1.5 to 1.0 in > https://opengrok.libreoffice.org/xref/core/vcl/osx/salframeview. > mm?r=57b88be1#43 > appears to solve the problem in case of swiping (didn't check with mouse > with scroll wheel) > > The "-(void)scrollWheel: (NSEvent*)pEvent" code appears to be actually used > when swiping. So this > https://opengrok.libreoffice.org/xref/core/vcl/osx/salframeview. > mm?r=57b88be1#1028 > Thanks @Telesto! I added a printf to -[SalFrameView scrollWheel:] and found that that call gets a huge amount of events with zero X and Y changes so I wonder if the LibreOffice code is getting overwhelmed with swipe events that cause no change. So, I add the following few lines of code to ignore a trackpad swipe or mouse wheel event that won't change anything in LibreOffice: diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index ae9528306cfa..5adc1042ed24 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -1048,6 +1048,10 @@ -(void)scrollWheel: (NSEvent*)pEvent pEvent = pNextEvent; } + // tdf#152406 Skip noop trackpad swipe events + if ( dX == 0.0 && dY == 0.0 ) + return; + NSPoint aPt = [NSEvent mouseLocation]; mpFrame->CocoaToVCL( aPt ); Maybe I am imagining, but with the above change, swiping vertically seems much more responsive and I haven't encountered the bug yet. I didn't change the scroll factor in my local build so I would be very interested if you see any improvement with the above change. -- You are receiving this mail because: You are the assignee for the bug.
