vcl/qt5/QtWidget.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1703c3bb70b1faa522c33ebdc1a8f353c60367e5
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Tue Aug 9 09:01:52 2022 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Tue Aug 9 10:00:27 2022 +0200

    tdf#149818 qt: Handle double mouse click again
    
    Qt has `QEvent::MouseButtonDblClick` as a specialized
    type for "Mouse press again" [1] in addition to
    just `QEvent::MouseButtonPress` for a single click.
    Handle that as mouse button down event in LO as well,
    to make handling of double-click work again after
    
        commit 393c9f736b10d1ea82979e9c2c43c8f91ba5831d
        Date:   Tue Apr 19 16:00:31 2022 +0200
    
            Qt use QEvent::type to handle the event correctly
    
    [1] https://doc.qt.io/qt-6/qevent.html
    
    Change-Id: I9964b554bf71f30861ed0868e7a8000c84de50ac
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138006
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index ead9979fcf21..c204d1be19a9 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -184,7 +184,7 @@ void QtWidget::handleMouseButtonEvent(const QtFrame& 
rFrame, const QMouseEvent*
     }
 
     SalEvent nEventType;
-    if (pEvent->type() == QEvent::MouseButtonPress)
+    if (pEvent->type() == QEvent::MouseButtonPress || pEvent->type() == 
QEvent::MouseButtonDblClick)
         nEventType = SalEvent::MouseButtonDown;
     else
         nEventType = SalEvent::MouseButtonUp;

Reply via email to