applets/pager: don't Show Desktop when scrolling pager

Scrolling past the first or last desktop asked the pager model to switch to the
current desktop, which toggles Show Desktop when that option is set for clicks.
Only change the page from the wheel handler when it is a different one.

BUG: 471241
This commit is contained in:
Niccolò Venerandi 2026-10-31 21:53:56 +01:00
parent 55162399b1
commit cab933b069

View file

@ -119,12 +119,17 @@ PlasmoidItem {
const nextPage = Plasmoid.configuration.wrapPage?
(pagerModel.currentPage + 1) % repeater.count :
Math.min(pagerModel.currentPage + 1, repeater.count - 1);
pagerModel.changePage(nextPage);
// At the last desktop: changePage() on the current one would toggle Show Desktop
if (nextPage !== pagerModel.currentPage) {
pagerModel.changePage(nextPage);
}
} else {
const previousPage = Plasmoid.configuration.wrapPage ?
(repeater.count + pagerModel.currentPage - 1) % repeater.count :
Math.max(pagerModel.currentPage - 1, 0);
pagerModel.changePage(previousPage);
if (previousPage !== pagerModel.currentPage) {
pagerModel.changePage(previousPage);
}
}
increment += (increment < 0) ? 1 : -1;