Newsgroups: comp.sys.atari.st.tech
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!fauern!faui43.informatik.uni-erlangen.de!csbrod
From: csbrod@immd4.informatik.uni-erlangen.de (Claus Brod)
Subject: Re: appl-id of running aes-process
Message-ID: <1991May9.084230.8314@informatik.uni-erlangen.de>
Organization: CSD., University of Erlangen, Germany
References: <3275@troll.cs.tu-berlin.de>
Date: Thu, 9 May 1991 08:42:30 GMT
Lines: 27

tolk@opal.cs.tu-berlin.de (Robert Tolksdorf) writes:

>Is there a way to find out the appl_id of the currently running program?
>It seems as if application 1 is GEM's screenmanager, 2 and above are
>accessories and 0 is the id of a loaded application. Does this hold in
>any circumstances?


The current main application has the apid 0 - but this will almost
certainly fail when Atari gives us something like a MultiDesktop one day.
You could try out what happens in such a environment by testing your
program under MultiGEM.

>Is it possible to get the appl_id of the application that is owner of the
>topmost window? Even if the running loaded application has id 1, there could
>always be an accessory that has opened the topmost window.

Just some illegal idea 8-) : Intercept the AES trap and look for
WF_TOP messages sent to any application. By looking in this application's
GLOBAL field you could find out its ID.

----------------------------------------------------------------------
Claus Brod, Am Felsenkeller 2,			Things. Take. Time.
D-8772 Marktheidenfeld, West Germany		(Piet Hein)
csbrod@medusa.informatik.uni-erlangen.de
Claus Brod@wue.maus.de
----------------------------------------------------------------------
