From 9f92a39234dfae40fe19ab6fa47caf8b21dd8847 Mon Sep 17 00:00:00 2001 From: Patrick Luby Date: Wed, 20 Dec 2023 09:32:06 -0500 Subject: [PATCH] Related: tdf#155266 stop delaying painting timer while swiping After fixing several flushing issues in tdf#155266, scrollbars still will not redraw until swiping has ended or paused when using Skia/Raster or Skia disabled. So, stop the delay by only including NSEventMaskScrollWheel if the current event type is not NSEventTypeScrollWheel. Change-Id: I9348e5a38b4d0fedbf424b92a71eed25280fc21f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161075 Tested-by: Jenkins Reviewed-by: Patrick Luby --- vcl/osx/salinst.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index 62ec90dd0005..7f755bb618b3 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -733,6 +733,7 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType ) unsigned/*NSUInteger*/ nEventMask = 0; if( nType & VclInputFlags::MOUSE) + { nEventMask |= NSEventMaskLeftMouseDown | NSEventMaskRightMouseDown | NSEventMaskOtherMouseDown | NSEventMaskLeftMouseUp | NSEventMaskRightMouseUp | NSEventMaskOtherMouseUp | @@ -740,6 +741,18 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType ) NSEventMaskScrollWheel | // NSEventMaskMouseMoved | NSEventMaskMouseEntered | NSEventMaskMouseExited; + + // Related: tdf#155266 stop delaying painting timer while swiping + // After fixing several flushing issues in tdf#155266, scrollbars + // still will not redraw until swiping has ended or paused when + // using Skia/Raster or Skia disabled. So, stop the delay by only + // including NSEventMaskScrollWheel if the current event type is + // not NSEventTypeScrollWheel. + NSEvent* pCurrentEvent = [NSApp currentEvent]; + if( pCurrentEvent && [pCurrentEvent type] == NSEventTypeScrollWheel ) + nEventMask &= ~NSEventMaskScrollWheel; + } + if( nType & VclInputFlags::KEYBOARD) nEventMask |= NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged; if( nType & VclInputFlags::OTHER) -- 2.11.4.GIT