Summary: | Desktop doesn't refresh when desktop wallpaper changes | ||
---|---|---|---|
Product: | kdesktop | Reporter: | tschmidty |
Component: | general | Assignee: | David Faure <faure> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | finex |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Mandrake RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
tschmidty
2002-06-10 19:37:01 UTC
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. |