It'd be nice!
9 years ago
Hardware: x86 → ARM
So it looks like WinCE uses a slightly different registry entry. HKCU\\ControlPanel\\Desktop instead of HKCU\\Control Panel\\Desktop So without testing right now, it looks like it might be as easy as #ifdef'ing around http://mxr.mozilla.org/mozilla-central/source/browser/components/shell/src/nsWindowsShellService.cpp#660 That said, it also looks like we'll have to tweak some other reg entries (eg, "Tile" instead of "TileWallpaper")
Morphing the bug a little bit to cover the other details that need to be tweaked. In addition to not being able to set the wallpaper, we * Can't set desktop color * Can't set tile Addressing each of these additional points: Desktop color is stored as part of a different entry in HKEY_LOCAL_MACHINE\SYSTEM\GWE\SysColor (specifically the second set of 4 2-character entries... confusing I know). Like I mentioned in comment #1, the tile setting is stored elsewhere too (and it's a DWORD instead of string). There are only two options, tiled  or not tiled (centered) , so we'll have to tweak that UI as well to only provide the 2 options. Also, while it looks like |::SystemParametersInfo(SPI_SETDESKWALLPAPER, ...| is supposed to work to set the wallpaper, it doesn't appear to be. So we might just want to set the reg value.
Assignee: nobody → paul
Summary: can't save an image as a desktop background on Windows CE → "Set As Desktop Background..." doesn't work on Windows CE
(In reply to comment #2) > Desktop color is stored as part of a different entry in > HKEY_LOCAL_MACHINE\SYSTEM\GWE\SysColor (specifically the second set of 4 > 2-character entries... confusing I know). It actually seems as though this does work. MSDN says that SetSysColors isn't supposed to persist across restarts, but it is. It's writing to the reg entry and so it looks like we don't have to explicitly write to the registry, so this might just be a win here.
Created attachment 391736 [details] [diff] [review] Patch v0.1 Makes it work. There's a little bit of hackiness when setting the wallpaper but it works. There's some oddity when the system's wallpaper control panel is open at the same time. We will set the color, won't set the wallpaper, and won't close the dialog. We don't hang & you can close the dialog by hitting cancel, or wait until the system's control panel is closed & then "set wallpaper" works. I don't think this is an issue that needs to be solved now (or ever really) since it's a rare use case.
Created attachment 391944 [details] [diff] [review] Patch v0.2 Moved the registry entry point into a define. It's building on tryserver now to make sure it's safe (though there's no reason it should break tier 1 windows)
Comment on attachment 391944 [details] [diff] [review] Patch v0.2 Looks fine
Attachment #391944 - Flags: review?(robert.bugzilla) → review+
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.