From kde-core-devel Sun Dec 21 16:03:19 2003 From: Ingo =?iso-8859-1?q?Kl=F6cker?= Date: Sun, 21 Dec 2003 16:03:19 +0000 To: kde-core-devel Subject: Re: Problem with applications which have a system tray applet and X-MARC-Message: https://marc.info/?l=kde-core-devel&m=107208785431497 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-02=_NRc5/HI+449HJ4t" --Boundary-02=_NRc5/HI+449HJ4t Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Sunday 21 December 2003 13:50, David Faure wrote: > On Sunday 07 December 2003 23:58, Ingo Kl=F6cker 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=20 wrote this will probably break a lot of applications. So I doubt that=20 it's feasible to change the current behavior before KDE 4.0. Regards, Ingo --Boundary-02=_NRc5/HI+449HJ4t Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQA/5cRNGnR+RTDgudgRAsN8AKCQdrZLWSHKX+JjNOUM15MQr4M1GgCguGWi 8bW2IxUmCAjl1BvyIttHSIo= =Rrz+ -----END PGP SIGNATURE----- --Boundary-02=_NRc5/HI+449HJ4t--