From c003baee1e65f13c19b6db02290de4734e4d6780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 16 Nov 2013 16:37:22 +0100 Subject: [PATCH] clamp timeline time for highlighted desktop BUG: 327539 FIXED-IN: 4.11.4 --- effects/desktopgrid/desktopgrid.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/effects/desktopgrid/desktopgrid.cpp b/effects/desktopgrid/desktopgrid.cpp index 7a53b528a2..e801653dff 100644 --- a/effects/desktopgrid/desktopgrid.cpp +++ b/effects/desktopgrid/desktopgrid.cpp @@ -914,7 +914,12 @@ void DesktopGridEffect::setHighlightedDesktop(int d) { if (d == highlightedDesktop || d <= 0 || d > effects->numberOfDesktops()) return; + if (highlightedDesktop > 0 && highlightedDesktop <= hoverTimeline.count()) + hoverTimeline[highlightedDesktop-1]->setCurrentTime(qMin(hoverTimeline[highlightedDesktop-1]->currentTime(), + hoverTimeline[highlightedDesktop-1]->duration())); highlightedDesktop = d; + if (highlightedDesktop <= hoverTimeline.count()) + hoverTimeline[highlightedDesktop-1]->setCurrentTime(qMax(hoverTimeline[highlightedDesktop-1]->currentTime(), 0)); effects->addRepaintFull(); }