summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorVladislav Tarakanov <vladislav.tarakanov@bk.ru>2024-01-04 20:09:38 +0400
committerAndras Timar <andras.timar@collabora.com>2024-02-06 12:28:51 +0100
commit19bfcc8e429950fa3fbf4cc22fde0190994a75e2 (patch)
treedad69608809e514e95cecdf557d0c3216b5a5234 /slideshow
parentf7f4d1b6c3aa9bc8f0432aab1e2b9bcf922eb2b8 (diff)
tdf#158924 Handle multi-clicks for navigation bar
Added handling for navigation bar buttons when many quick clicks have been made. To do this, after processing the first click, the number of clicks in the series is stored in a new variable. Until the entire series of clicks has been processed, the slide switch will not occur. Change-Id: I8f4416a0c7928bb78609be8ff52252782c37f5a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161625 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> (cherry picked from commit ab320f4e11c70b50e5beddf12ad925f192941d9a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162904
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/slideoverlaybutton.cxx10
-rw-r--r--slideshow/source/engine/slideoverlaybutton.hxx1
2 files changed, 10 insertions, 1 deletions
diff --git a/slideshow/source/engine/slideoverlaybutton.cxx b/slideshow/source/engine/slideoverlaybutton.cxx
index 40ade676b383..987cd11dfb8c 100644
--- a/slideshow/source/engine/slideoverlaybutton.cxx
+++ b/slideshow/source/engine/slideoverlaybutton.cxx
@@ -170,7 +170,15 @@ bool SlideOverlayButton::handleMouseReleased(const css::awt::MouseEvent& e)
&& clickPnt.getY() > btnPnt.getY()
&& clickPnt.getY() < btnPnt.getY() + mxIconBitmap->getSize().Height)
{
- mClickHandler(clickPnt);
+ if (mnIgnoreClicksCnt == 0)
+ {
+ mnIgnoreClicksCnt = e.ClickCount - 1;
+ mClickHandler(clickPnt);
+ }
+ else
+ {
+ mnIgnoreClicksCnt--;
+ }
return true;
}
return false;
diff --git a/slideshow/source/engine/slideoverlaybutton.hxx b/slideshow/source/engine/slideoverlaybutton.hxx
index db733a2b2cd4..7358743ee3e9 100644
--- a/slideshow/source/engine/slideoverlaybutton.hxx
+++ b/slideshow/source/engine/slideoverlaybutton.hxx
@@ -96,6 +96,7 @@ private:
ViewsVecT maViews;
ScreenUpdater& mrScreenUpdater;
bool mbVisible = false;
+ sal_Int32 mnIgnoreClicksCnt = 0;
};
}