(*** This bug was imported into bugs.kde.org ***) Package: kdesktop Version: KDE 3.0.1 Severity: wishlist Installed from: Mandrake RPMs Compiler: Not Specified OS: Linux OS/Compiler notes: Not Specified When I change the desktop wallpaper by copying over the file the desktop wallpaper does not refresh. Refresh Desktop does not refresh the image. The oly way to change it is to go into the background options (which will thmbnail the new picture) and select a different image apply select my wallpaper file again then apply again. Under other OS's and WM's changing the file is enough to get the desktop refreshed. Would allow a file to be changed by scripts daily or whatever. Not really a bug but it does seem as if it would be possible. Not sure if there is a way to add a hook of some sort to detect when the file changes or perhaps at least make the 'refresh desktop' option on the menu look for a newer file. Thanks Tod Schmidt (Submitted via bugs.kde.org)
I too discovered the same issue while trying to get another program (xplanet) to render my background, as the 'program' option had disappered (kde 3.1.1) from the desktop config tool. I ran a script to overwrite a single file(~/xplanet.png). KDE did not pickup the change, which seems reasonable, so I then tried to use dcop to refresh/reload the background image: dcop kdesktop KBackgroundIface changeWallpaper (Only works through dcop when more than one file in multiple list - BUT does work with only one file if we just let the timer run (ie, 1 min, or whatever)) - bug in dcop interface? dcop kdesktop KBackgroundIface setWallpaper ~/xplanet.png 1 (Only works if you choose another image, then revert (as per report above), or if you change the mode to another integer. dcop kdesktop KDesktopIface refresh (Does not seem to reload the background image either) Looking at kdebase/kdesktop/bgmanager.cc it seems that the background image is only reloaded when the *name* of the image changes: // If the background is the same: do nothing if (m_Hash == m_Renderer[edesk]->hash()) { exportBackground(m_Current, desk); return; } Could be a case of over-optimisation. We could take into account the mtime of the file as well as the name, or add another call to the dcop interface to force a 'hard refresh', where the background image is forciably reloaded. The behavior of the dcop call to changeWallpaper seems to be inconistant with the behaviour of the background wallpaper changing timer. In any case, many congrats on 3.1.1 - very nice. Just don't make it /too/ friendly. ;) Cheers, Leon
Subject: kdebase CVS commit by waba: CCMAIL: 43782-done@bugs.kde.org Let "dcop kdesktop KBackgroundIface changeWallpaper" reload the current wallpaper if it has changed on disk. (BR43782) M +7 -3 kcontrol/background/bgsettings.cpp 1.4 M +1 -3 kdesktop/bgmanager.cc 1.77 --- kdebase/kdesktop/bgmanager.cc #1.76:1.77 @@ -566,6 +566,4 @@ void KBackgroundManager::changeWallpaper { KBackgroundRenderer *r = m_Renderer[effectiveDesktop()]; - if (r->multiWallpaperMode() == KBackgroundSettings::NoMulti) - return; r->changeWallpaper(); --- kdebase/kcontrol/background/bgsettings.cpp #1.3:1.4 @@ -881,5 +881,5 @@ void KBackgroundSettings::changeWallpape break; default: - return; + break; } @@ -939,5 +939,9 @@ QString KBackgroundSettings::fingerprint s += QString("wm:%1;").arg(m_WallpaperMode); if (m_WallpaperMode != NoWallpaper) - s += QString("wp:%1;").arg(currentWallpaper()); + { + Q_UINT32 rh = KGlobal::dirs()->calcResourceHash("wallpaper", currentWallpaper(), false); + s += QString("wp:%2:%1;").arg(rh).arg(currentWallpaper()); + + } s += QString("blm:%1;").arg(m_BlendMode); if (m_BlendMode != NoBlending) {
Bug closed. Kdesktop is no more mantained.