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 <plubius@libreoffice.org>
(cherry picked from commit 9f92a39234dfae40fe19ab6fa47caf8b21dd8847)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161103
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d7b85b1..6946f11 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -726,6 +726,7 @@ bool AquaSalInstance::AnyInput( VclInputFlags nType )

    unsigned/*NSUInteger*/ nEventMask = 0;
    if( nType & VclInputFlags::MOUSE)
    {
        nEventMask |=
            NSEventMaskLeftMouseDown    | NSEventMaskRightMouseDown    | NSEventMaskOtherMouseDown    |
            NSEventMaskLeftMouseUp      | NSEventMaskRightMouseUp      | NSEventMaskOtherMouseUp      |
@@ -733,6 +734,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)