Wallpaper: made the selection more responsive to clicks + code cleanup

This commit is contained in:
LemmyCook 2025-08-30 12:19:38 -04:00
parent 3c7d03ada9
commit 125a3ace08
5 changed files with 78 additions and 65 deletions

View file

@ -121,17 +121,17 @@ Singleton {
// -------------------------------------------------------------------
function changeWallpaper(screenName, path) {
if (screenName !== undefined) {
setWallpaper(screenName, path)
_setWallpaper(screenName, path)
} else {
// If no screenName specified change for all screens
for (var i = 0; i < Quickshell.screens.length; i++) {
setWallpaper(Quickshell.screens[i].name, path)
_setWallpaper(Quickshell.screens[i].name, path)
}
}
}
// -------------------------------------------------------------------
function setWallpaper(screenName, path) {
function _setWallpaper(screenName, path) {
if (path === "" || path === undefined) {
return
}