[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2545.0. "ID of SM?" by HKOVC::TERENCE (From Middlesex, UWO) Fri Mar 30 1990 06:38

    Can I find the ID of my Session Manager Window?
    
    -Terry
T.RTitleUserPersonal
Name
DateLines
2545.1DCL code to find SM PIDNITMOI::PESENTIOnly messages can be draggedFri Mar 30 1990 12:2228
Here is some DCL code that works for me:

$	sm_image = "DECW$SESSION"
$	! The file name of the Session Manager Image.

$	pid_context = ""
$	! Initialize the pid context pointer
                                                                         
$ get_sm_pid:	! Find Session Manager Process

$	pid = f$pid(pid_context)
$	! Try next pid.

$	if pid .eqs. "" then goto done
$	! If all processes have been checked, we are done.

$	image_file = f$parse(f$getjpi(pid,"imagname"),,,"name","syntax_only")
$	! Get the file name of the image the process is running.

$	if image_file .nes. sm_image then goto get_sm_pid
$	! If it is not the session manager, try the next process.

$	write sys$output "Session Manager PID:        ''pid'"
$	! Tell the world.

$ done:
$	exit
    
2545.2PSW::WINALSKICareful with that VAX, EugeneFri Mar 30 1990 18:568
.0 is asking about the session manager *window* ID, not *process* ID.

Take a look at TLE::ULNK$:[WINALSKI.XAQUARIUM]SMPAUSEWINDOW.C.  This module
contains routines for walking the window tree and locating the session manager's
pause window.  In the process, it has to find the session manager's main
window as well.

--PSW
2545.3HKOVC::TERENCEFrom Middlesex, UWOMon Apr 02 1990 09:028
    Re: -2
    
    I know how to use XQueryTree() to find both the root window and the
    pause window. But among all the childs that are returned by
    XQueryTree(), how can I tell which one is the Session Manager Window?
    Does it has any special characteristics?
    
    -Terry
2545.4Try these...GSRC::WESTVariables don't, Constants aren'tMon Apr 02 1990 15:3611
  For XUI (DECwindows V2.0)...

    Resource Class --> Decw$Session
    Resource Name  --> Session Manager

  Search for these strings on each window you find...it will be the window
you are interested in.

					-=> Jim <=-

2545.5How about under ultrix?RTL::PELLEGRINOBob PellegrinoTue Apr 03 1990 21:117
Has anyone come up with a reliable scheme for finding the Pause window on
a Pmax server?  I asked this question once before, and the reply at the time
was that there was something different needed for a Pmax that was being
worked on.  Is this something I should figure out, or has someone already done 
it?

--bob
2545.6Hope this helps...a little :^)GSRC::WESTVariables don't, Constants aren'tWed Apr 04 1990 01:3827
  Well here is the steps I did when first looking for the Pause Window.

  Wrote a program similar to xlswins to dump out every window with its
geometry. Xlswins will work, I just didn't know about it at the time.

  Started unmapping/mapping every window that had a large enough size to
be a pause window until I found the right one.  Then just did XQueryTree
to get the heirarchy and came up with the algorithm from there.

  The whole process took less than a half an hour.  I don't have access
to a PMAX but this method should still work.


  Note:  Not sure if Session Manager on PMAX does the same as VMS does
	 but with the knowledge of the fact that the pause window does
	 not yet exist until the first time PAUSE is used, you could get
	 a list of all the windows before the *first* pause and then
	 a list of windows after the pause and see what new windows
	 appear on your list.

  I realize that this is probably not the answer you want but if no one
has done this yet and you want to "find the pause window" the above steps
will help you.

						-=> Jim <=-

2545.7PSW::WINALSKICareful with that VAX, EugeneWed Apr 04 1990 21:436
TLE::ULNK$:[WINALSKI.XAQUARIUM]SMPAUSEWINDOW.C can find the session manager's
pause window on either VMS or Ultrix.  There is a timing window problem in this
code during session startup on the PMAX.  I have a correction for it but I
haven't had time to update the code yet.

--PSW