sc/source/ui/view/gridwin.cxx |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

New commits:
commit 78568d4baac8b84b5d9cb50704b3e62b67ab1178
Author:     Henry Castro <hcas...@collabora.com>
AuthorDate: Wed Dec 14 11:40:16 2022 -0400
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Sat Jan 28 09:24:18 2023 +0000

    lok:sc: do not generate extra mouseup events
    
    In tiled rendering case, the client side always will
    send the pair mousedown/mouseup events to server side,
    it is not necessary to generate extra mouseup events
    when the mouse tracking has ended, otherwise the selection
    engine will receive two mouseup events and wrong selection
    states.
    
    Signed-off-by: Henry Castro <hcas...@collabora.com>
    Change-Id: I99983de9591e26f6e5327fff63c45e682cbf1999
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144168
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145611
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 547338589298..ca863a848a38 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -2879,11 +2879,14 @@ void ScGridWindow::Tracking( const TrackingEvent& rTEvt 
)
     }
     else if ( rTEvt.IsTrackingEnded() )
     {
-        // MouseButtonUp always with matching buttons (eg for test tool, # 
63148 #)
-        // The tracking event will indicate if it was completed and not 
canceled.
-        MouseEvent aUpEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(),
-                            rMEvt.GetMode(), nButtonDown, rMEvt.GetModifier() 
);
-        MouseButtonUp( aUpEvt );
+        if (!comphelper::LibreOfficeKit::isActive())
+        {
+            // MouseButtonUp always with matching buttons (eg for test tool, # 
63148 #)
+            // The tracking event will indicate if it was completed and not 
canceled.
+            MouseEvent aUpEvt( rMEvt.GetPosPixel(), rMEvt.GetClicks(),
+                               rMEvt.GetMode(), nButtonDown, 
rMEvt.GetModifier() );
+            MouseButtonUp( aUpEvt );
+        }
     }
     else
         MouseMove( rMEvt );

Reply via email to