[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Problem with applications which have a system tray applet and
From:       Ingo =?iso-8859-1?q?Kl=F6cker?= <kloecker () kde ! org>
Date:       2003-12-21 16:03:19
[Download RAW message or body]


On Sunday 21 December 2003 13:50, David Faure wrote:
> On Sunday 07 December 2003 23:58, Ingo Klöcker wrote:
> > > Why not simply call kapp->ref() from the systemtray (your derived
> > > class for now, the base one in kde-4 maybe), and deref in the
> > > dtor?
> > >
> > > Then the user has to close the systray thingie by whichever way,
> > > before the process exits.
> >
> > Hah! I'm glad I'm not the only one that makes this mistake. That's
> > what I tried first after I found out about kapp->ref(). But it
> > doesn't work. Now, think again and tell me why it won't work. ;-)
> >
> > Hint: kapp->deref() is called each time a last visible window is
> > closed. And you can close a last visible window more than once.
>
> 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?

Yes, this is much simpler and much more logical. But as Martijn already 
wrote this will probably break a lot of applications. So I doubt that 
it's feasible to change the current behavior before KDE 4.0.

Regards,
Ingo

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic