Problem with applications which have a system tray applet and secondary windows

Martijn Klingens klingens at kde.org
Sun Dec 21 12:59:53 GMT 2003


On Sunday 21 December 2003 13:50, David Faure wrote:
> You're right, there's something missing. I just had a thought about this,
> and: when creating a first new KMainWindow after that "deref" call, it
> should call ref again somehow.
>
> So maybe a simpler way would be that every KMainWindow calls ref in its
> ctor and deref in its dtor. This is much simpler, cleaner, and should work,
> no?

Yeah, that's obviously the better solution. I'm only a bit worried about side 
effects with code that is already fiddling with ref/deref to work around the 
problem like KMail and Kopete are already doing.

In the Kopete case we have the additional problem that the main window is 
hidden, not closed, because KSystemTray is a child of it (who designed the 
KSystemTray API that way? :), does that work properly? I'd say it simply 
doesn't deref when hiding and thus automagically works, but better make sure 
before we change this :)

Last, in Kopete, and most of e.g. the extra gear apps too there's the 
compatibility with previous KDE versions. Is this a problem?

-- 
Martijn




More information about the kde-core-devel mailing list