tolk@opal.cs.tu-berlin.de (Robert Tolksdorf) (05/09/91)
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? 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. The background: I'm working on an accessory that sends window-messages to the currently running application. It works fine - even with the desktop - as long as there are no accessory-owned windows. I'm sending the messages via appl_write to application 1 with the window-handle returned by wind_get(0,WF_TOP,...) Ciao Robert Tolksdorf / Koertestr.30 / D-1000 Berlin 61
csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (05/09/91)
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 ----------------------------------------------------------------------