summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorPatrick Luby <guibmacdev@gmail.com>2024-05-07 17:41:10 -0400
committerAndras Timar <andras.timar@collabora.com>2024-05-17 19:57:43 +0200
commit11614498c189beb8b32cb226a1dad0d33151fadf (patch)
treef15ab7785cb2051aa18a6cf9fb2d248619c5c47e /vcl
parent6f33df3f243d6012730fccd644f3c386526a3363 (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
Diffstat (limited to 'vcl')
-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)