🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.sun
Article #14227

Re: Am I running under sunview?

#14227
From: Sandeep Mehta
Date: Tue, 13 Mar 1990 14:21
16 lines
1329 bytes
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 ?
Technical Details
Message-ID: <5741@brazos.Rice.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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