Wrong (?) usage of deprecated and usage of setActiveWindow vs. activateWindow (was: Re: kdelibs/kdecore)

Cornelius Schumacher schumacher at kde.org
Wed Oct 29 14:57:36 GMT 2003


On Wednesday 29 October 2003 15:27, Lubos Lunak wrote:
>
>  I cannot put the whole explanation in kwin.h, it's way too long. But I
> guess I could at least mention it.

You could make the README a README.dox, do some Doxygen markup and reference 
it from the header file API docs. This way it will appear in the generated 
API docs, but you don't have to include it in the header file.

>  It does. If the application is the active one, setActiveWindow() and
> activateWindow() are really the same. But if not, then setActiveWindow()
> will activate the window anyway, while activateWindow() will not. That's
> why the sooner one is for pagers etc., which indeed should always do that,
> while activateWindow() is for the latter, because applications should not
> get activated whenever they feel like they should. E.g. if you decided
> KMail should activate its main window after every new mail check if there's
> new mail, you'd get a lot of hate mails from people using periodic mail
> check if you used setActiveWindow(), while with activateWindow() KWin would
> step in and refuse activation.

In KOrganizer we use setActiveWindow() when starting KOrganizer from the 
command line with a file name as argument. If a KOrganizer main window 
viewing the given file is already present, we activate it. In this case we 
don't have an active KOrganizer window yet. How can activateWindow work here? 
We do need setActiveWindow() instead, don't we?

-- 
Cornelius Schumacher <schumacher at kde.org>





More information about the kde-core-devel mailing list