summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-05-07 17:41:10 -0400
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2024-05-14 07:34:24 +0200
commit812c3cf069b068b75d01662c241b52bec2dd2928 (patch)
tree24dd00ef74b4ae6068977e20579b3649664d6462
parenta4c2c23cbb77a2d821e71e6a51f8e6d1779f1e3e (diff)
tdf#160767 skip fix for tdf#155266 when the event hasn't changed
When scrolling in Writer with automatic spellchecking enabled, the current event never changes because the fix for tdf#155266 causes Writer to get stuck in a loop. So, if the current event has not changed since the last pass through this code, skip the fix for tdf#155266. Change-Id: I97265a7698756c5fb65b6686f6bb77c1caa08862 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167229 Reviewed-by: Patrick Luby <guibomacdev@gmail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
-rw-r--r--vcl/osx/salinst.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 7f755bb618b3..33101c8d1b11 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -750,7 +750,22 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType )
// not NSEventTypeScrollWheel.
NSEvent* pCurrentEvent = [NSApp currentEvent];
if( pCurrentEvent && [pCurrentEvent type] == NSEventTypeScrollWheel )
- nEventMask &= ~NSEventMaskScrollWheel;
+ {
+ // tdf#160767 skip fix for tdf#155266 when the event hasn't changed
+ // When scrolling in Writer with automatic spellchecking enabled,
+ // the current event never changes because the fix for tdf#155266
+ // causes Writer to get stuck in a loop. So, if the current event
+ // has not changed since the last pass through this code, skip
+ // the fix for tdf#155266.
+ static NSEvent *pLastCurrentEvent = nil;
+ if( pLastCurrentEvent != pCurrentEvent )
+ {
+ if( pLastCurrentEvent )
+ [pLastCurrentEvent release];
+ pLastCurrentEvent = [pCurrentEvent retain];
+ nEventMask &= ~NSEventMaskScrollWheel;
+ }
+ }
}
if( nType & VclInputFlags::KEYBOARD)