svtools/source/control/tabbar.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 816b3607dd9676a343e8ee544b615e75393566d3
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Mon Feb 20 15:54:22 2023 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Mon Feb 20 21:01:11 2023 +0000

    Resolves: tdf#153763 first/last buttons in tabbar not responding
    
    Change-Id: Id6e70eca7c2d523643d9e38e8c7402879464bf5a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147343
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/svtools/source/control/tabbar.cxx 
b/svtools/source/control/tabbar.cxx
index a0995eef4910..ddadf400761d 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -884,13 +884,16 @@ void TabBar::ImplShowPage( sal_uInt16 nPos )
 
 IMPL_LINK( TabBar, ImplClickHdl, weld::Button&, rBtn, void )
 {
-    if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+    if (&rBtn != mpImpl->mxButtonBox->m_xFirstButton.get() && &rBtn != 
mpImpl->mxButtonBox->m_xLastButton.get())
     {
-        // like tdf#149482 if we didn't see a mouse up, but find that the 
mouse is no
-        // longer pressed at this point, then bail
-        mpImpl->mxButtonBox->m_xPrevRepeater->Stop();
-        mpImpl->mxButtonBox->m_xNextRepeater->Stop();
-        return;
+        if ((GetPointerState().mnState & (MOUSE_LEFT | MOUSE_MIDDLE | 
MOUSE_RIGHT)) == 0)
+        {
+            // like tdf#149482 if we didn't see a mouse up, but find that the 
mouse is no
+            // longer pressed at this point, then bail
+            mpImpl->mxButtonBox->m_xPrevRepeater->Stop();
+            mpImpl->mxButtonBox->m_xNextRepeater->Stop();
+            return;
+        }
     }
 
     EndEditMode();

Reply via email to