Am I running under sunview?

Sandeep Mehta sxm at philabs.philips.com
Wed Mar 14 00:21:55 AEST 1990


In article <5712 at brazos.Rice.edu>, advsys!graham at relay (Graham Underwood) writes:
>Does anyone know a reliable way for a program to detect whether it is
>executed under Sunview or not.
>
>The way Sun supplied applications (such as shelltool) work is to check for
>WINDOW_PARENT in the environment.  This test however breaks down if the
>program is executed using `on' since the environment is exported. 

Well, using WINDOW_PARENT/WINDOW_ME/WINDOW_GFX works most of the time, but
I can see why your program would need something more reliable. You could
either choose to twiddle the (envp) envariables exported.  Something I do
is to try and talk directly to the window manager using
we_getparentwindow() (and/or traverse the tree to the root
win_getlink(wfd, WL_OLDESTCHILD) etc.).

sxm at philabs.philips.com                             ...to be or not to bop ?



More information about the Comp.sys.sun mailing list