vcl/source/control/listctrl.cxx  |   10 ++++++++--
 vcl/source/edit/vclmedit.cxx     |    8 +++++---
 vcl/source/treelist/svimpbox.cxx |   10 ++++++----
 3 files changed, 19 insertions(+), 9 deletions(-)

New commits:
commit e9b3c8d290e5a2f5f54c13d3529c2cad8053df71
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Sat Jun 15 15:44:33 2019 +0900
Commit:     Andras Timar <andras.ti...@collabora.com>
CommitDate: Mon Jun 17 15:01:19 2019 +0200

    tdf#124907 vcl: react to pan gesture for listbox and other widgets
    
    Reviewed-on: https://gerrit.libreoffice.org/74087
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    (cherry picked from commit 08f485c6e92bd56c8c26171316b842cd213a8a09)
    
    Change-Id: I4579f8edd2bf24506b1d55a7291cd86e276f30a4
    Reviewed-on: https://gerrit.libreoffice.org/74164
    Reviewed-by: Andras Timar <andras.ti...@collabora.com>
    Tested-by: Andras Timar <andras.ti...@collabora.com>

diff --git a/vcl/source/control/listctrl.cxx b/vcl/source/control/listctrl.cxx
index 50b03eddc918..62f6a1dbc90a 100644
--- a/vcl/source/control/listctrl.cxx
+++ b/vcl/source/control/listctrl.cxx
@@ -158,9 +158,15 @@ bool ListControl::EventNotify( NotifyEvent& rNEvt )
     if (rNEvt.GetType() == MouseNotifyEvent::COMMAND)
     {
         const CommandEvent* pEvent = rNEvt.GetCommandEvent();
-        if (pEvent && pEvent->GetCommand() == CommandEventId::Wheel)
+        if (pEvent)
         {
-            HandleScrollCommand(*pEvent, nullptr, mpScrollBar.get());
+            CommandEventId nCommand = pEvent->GetCommand();
+
+            if (nCommand == CommandEventId::Wheel ||
+                nCommand == CommandEventId::Gesture)
+            {
+                HandleScrollCommand(*pEvent, nullptr, mpScrollBar.get());
+            }
         }
     }
     return true;
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 759bef4e6a68..66eadf02c28d 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -693,9 +693,11 @@ void ImpVclMEdit::Enable( bool bEnable )
 bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt )
 {
     bool bDone = false;
-    if ( ( rCEvt.GetCommand() == CommandEventId::Wheel ) ||
-         ( rCEvt.GetCommand() == CommandEventId::StartAutoScroll ) ||
-         ( rCEvt.GetCommand() == CommandEventId::AutoScroll ) )
+    CommandEventId nCommand = rCEvt.GetCommand();
+    if (nCommand == CommandEventId::Wheel ||
+        nCommand == CommandEventId::StartAutoScroll ||
+        nCommand == CommandEventId::AutoScroll ||
+        nCommand == CommandEventId::Gesture)
     {
         (void)mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, 
mpVScrollBar );
         bDone = true;
diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index be0ccf735446..e7d4370c7365 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -2850,10 +2850,12 @@ void SvImpLBox::Command(const CommandEvent& rCEvt)
         aEditIdle.Stop();
 
     // scroll mouse event?
-    if (((nCommand == CommandEventId::Wheel) || (nCommand == 
CommandEventId::StartAutoScroll)
-         || (nCommand == CommandEventId::AutoScroll))
-        && pView->HandleScrollCommand(rCEvt, aHorSBar.get(), aVerSBar.get()))
-        return;
+    if (nCommand == CommandEventId::Wheel || nCommand == 
CommandEventId::StartAutoScroll
+        || nCommand == CommandEventId::AutoScroll || nCommand == 
CommandEventId::Gesture)
+    {
+        if (pView->HandleScrollCommand(rCEvt, aHorSBar.get(), aVerSBar.get()))
+            return;
+    }
 
     if (bContextMenuHandling && nCommand == CommandEventId::ContextMenu)
     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to