Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: sxm@philabs.philips.com (Sandeep Mehta) Newsgroups: comp.sys.sun Subject: Re: Am I running under sunview? Keywords: Windows Message-ID: <5741@brazos.Rice.edu> Date: 13 Mar 90 14:21:55 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 16 Approved: Sun-Spots@rice.edu X-Refs: Original: v9n77 X-Sun-Spots-Digest: Volume 9, Issue 77, message 5 In article <5712@brazos.Rice.edu>, advsys!graham@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@philabs.philips.com ...to be or not to bop ?