KIconLoader improvements: icon server

Waldo Bastian bastian at
Wed Jun 15 14:09:16 BST 2005

On Tuesday 14 June 2005 15:33, Gustavo Pichorim Boiko wrote:
> Hi
> There has been a discussion on kde-optimize about KIconLoader improvements.
> I'm working to create an icon server that is used to share icons between
> applications. The original idea and its initial implementation is from
> Lubos Lunak.
> The idea is to have a daemon running which publishes icons and stay
> refcounting their usage. When an application requests an icon to
> KIconLoader, it checks for the icon in a cache file which contains just the
> key and the X resource id for the icon. If the icon is there, it creates a
> pixmap using the given resource id (sharing the pixmap in the X server). If
> the icon is not there, it queue the icon to be sent to the server.
> One problem I had (and I want a little help on that) is when using
> KUniqueApplication. When it forks, there is a race condition on the DCOP
> calls (when the KIconLoader is created, it checks for the iconserver to be
> running using a DCOP call). Simply commenting the dc->setPriorityCall(true)
> lines in kuniqueapplication.cpp solved the problem, but I don't think that
> is the best way of doing it, help is appreciated.

The setPriorityCall(true) is there to make sure that the newInstance() call 
that KUniqueApplication does is handled before any other incoming DCOP call.

Is the problem that the iconserver calls itself?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list