mirror of
https://invent.kde.org/plasma/plasma-desktop.git
synced 2026-11-03 22:59:45 -09:00
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:
parent
55162399b1
commit
cab933b069
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue