Bug 460692 - Canceling a wallpaper change does not revert to the original image when the current wallpaper is the default one
Summary: Canceling a wallpaper change does not revert to the original image when the c...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Image & Slideshow wallpaper plugins (show other bugs)
Version: 5.26.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2022-10-19 02:29 UTC by Bernhard
Modified: 2022-10-23 01:24 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.26.2
Sentry Crash Report:


Attachments
relevant section of plasmashell log (7.35 KB, text/plain)
2022-10-19 08:25 UTC, Bernhard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard 2022-10-19 02:29:32 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Context Menu > Configure Desktop and Wallpaper
2. Select different wallpaper
3. Press Cancel, Discard

OBSERVED RESULT
Wallpaper changes when selecting one - does not change back after Cancel + Discard

EXPECTED RESULT
Wallpaper changes to the original wallpaper

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.26.1
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
Kernel Version: 5.15.74-1-lts (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Layout is set to Desktop
The change does not seem to get written to config as "plasmashell --replace" reverts it.
Comment 1 Fushan Wen 2022-10-19 02:36:42 UTC
Can you provide log of plasmashell when changing the wallpaper?
Comment 2 Bernhard 2022-10-19 08:25:55 UTC
Created attachment 153020 [details]
relevant section of plasmashell log

Obtained from "journalctl /usr/bin/plasmashell -f". Please let me know if you need something else
Comment 3 Fushan Wen 2022-10-19 11:44:49 UTC
Can reproduce
Comment 4 Bug Janitor Service 2022-10-19 15:54:11 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/2238
Comment 5 Fushan Wen 2022-10-23 01:21:35 UTC
Git commit 0eb8db0e70330bffc3abfb6c51859e6ab1a3cb70 by Fushan Wen.
Committed on 23/10/2022 at 00:38.
Pushed by fusionfuture into branch 'master'.

wallpapers/image: fall back to default wallpaper when url is empty

It's expected to use the default wallpapaer when url is empty, which is
also the default value.

When closing the wallpaper config dialog without saving config, the
source property of MediaProxy will become empty if the previous
wallpaper is the default wallpaper, but in setSource empty url will
be directly rejected instead of switching to the default wallpaper.

This fixes the wrong behavior by calling `useSingleImageDefaults` when
url is empty, and reset the source url in `useSingleImageDefaults` so it
can find a wallpaper from the current Plasma theme.

M  +5    -2    wallpapers/image/plugin/utils/mediaproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/0eb8db0e70330bffc3abfb6c51859e6ab1a3cb70
Comment 6 Fushan Wen 2022-10-23 01:23:45 UTC
Git commit c15596dbc8e3d90de6f64a8e6545b482ff694579 by Fushan Wen.
Committed on 23/10/2022 at 01:23.
Pushed by fusionfuture into branch 'Plasma/5.26'.

wallpapers/image: fall back to default wallpaper when url is empty

It's expected to use the default wallpapaer when url is empty, which is
also the default value.

When closing the wallpaper config dialog without saving config, the
source property of MediaProxy will become empty if the previous
wallpaper is the default wallpaper, but in setSource empty url will
be directly rejected instead of switching to the default wallpaper.

This fixes the wrong behavior by calling `useSingleImageDefaults` when
url is empty, and reset the source url in `useSingleImageDefaults` so it
can find a wallpaper from the current Plasma theme.


(cherry picked from commit 0eb8db0e70330bffc3abfb6c51859e6ab1a3cb70)

M  +5    -2    wallpapers/image/plugin/utils/mediaproxy.cpp

https://invent.kde.org/plasma/plasma-workspace/commit/c15596dbc8e3d90de6f64a8e6545b482ff694579