vcl/osx/salinst.cxx |   13 +++++++++++++
 1 file changed, 13 insertions(+)

New commits:
commit 4509eb097d82b84423f8cbba3c9915a9fbe6f691
Author:     Patrick Luby <plub...@libreoffice.org>
AuthorDate: Wed Dec 20 09:32:06 2023 -0500
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Jan 4 18:03:51 2024 +0100

    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 <plub...@libreoffice.org>
    (cherry picked from commit 9f92a39234dfae40fe19ab6fa47caf8b21dd8847)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161103
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d7b85b1c23f6..6946f11c143e 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)

Reply via email to