Summary: | Signal KApplication::backgroundChanged(int) is confusing | ||
---|---|---|---|
Product: | kdesktop | Reporter: | Seb <bastisemail> |
Component: | general | Assignee: | David Faure <faure> |
Status: | CLOSED UNMAINTAINED | ||
Severity: | normal | CC: | finex |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Seb
2004-09-10 15:49:41 UTC
I think whoever programmed this signal meant it to be for features like the transparency, i.e. where only the current desktop matters (whereas for a pager all desktops matter indeed) I don't really know the code, but the signal is emitted from KBackgroundManager::exportBackground() in kdebase/kdesktop/. I think the exp_from check could be where your bug comes from, maybe this patch would help? Index: bgmanager.cc =================================================================== RCS file: /home/kde/kdebase/kdesktop/bgmanager.cc,v retrieving revision 1.90 diff -u -p -r1.90 bgmanager.cc --- bgmanager.cc 28 Aug 2004 10:48:48 -0000 1.90 +++ bgmanager.cc 10 Sep 2004 18:30:11 -0000 @@ -321,13 +321,17 @@ void KBackgroundManager::slotChangeDeskt */ void KBackgroundManager::exportBackground(int pixmap, int desk) { - if (!m_bExport || (m_Cache[desk]->exp_from == pixmap)) + if ( !m_bExport ) + return; + + KIPC::sendMessageAll(KIPC::BackgroundChanged, desk+1); + + if (m_Cache[desk]->exp_from == pixmap) return; m_Cache[desk]->exp_from = pixmap; m_pPixmapServer->add(KRootPixmap::pixmapName(desk+1), m_Cache[pixmap]->pixmap); - KIPC::sendMessageAll(KIPC::BackgroundChanged, desk+1); } Ouch I can't confirm this patch. I can't compile kde by myself. (modem connection - that would be a long run to download the kde sources). I hope you can test it by yourself, download the pager from the above link and verify the patch. (And then there might be a bug in the pager itself) I'll trust you, you can close the bug and I am gonna wait for kde 3.3.1. Thanks for the fast reply! Sebastian The above link is not correct. It works with http://www.uni-weimar.de/~wolff3/kdelook/kpager2-2004.09.11.tar.bz2 One questions about the source code (it might still be wrong): The signal that it the background was changed must be emitted AFTER the internal pixmaps are saved. Else I would receive the signal, would ask KDesktop via DCOP to send me the background pixmap and it would send me either the old or no picture. Another issue (I am sorry for these uncompressed mails): What is also wrong is that the signal is emitted whenever the desktop is changed if there are multiple wallpapers. This would be a bug in Konsole. They have to listen on KWinModule::desktopChanged to catch this and then to load the background if it is not common. Still didn't get a chance to test the patch? Kdesktop is no more mantained. Fortunatly this bug seems not to be valid for KDE 4. Please reopen if this bug is not a kdesktop one (and it is not solved) or it can be reproduced on KDE 4. Bug closed. Kdesktop is no more mantained. |