Can several windows be smgr/wmgr/phmgr?

David H. Brierley dave at galaxia.Newport.RI.US
Tue Feb 28 08:33:12 AEST 1989


In article <848 at jhunix.HCF.JHU.EDU> ecf_hap at jhunix.HCF.JHU.EDU (Andrew Poling) writes:
>
>In article <618 at icus.islp.ny.us> lenny at icus.islp.ny.us (Lenny Tropiano) writes:
>>
>>	ioctl(wd,WIOCSYS,SYSWMGR);	/* declare to be system window */
>>
>
>I've been wondering if more than one window can issue this ioctl.
>Anybody tried it or know?

The WIOCSYS function is limited to one window at a time.  Well, actually one
window per listed special function (wmgr, smgr, ph).  Each special function
has a list of keys that "belong" to it.  The wmgr has suspd, s-suspd, resume,
s-resume, and s-print; the wmgr has msg and s-msg; and the phone manager has
all shifted function keys (f1-f8).  The WIOCSYS ioctl will stay in effect
until overridden by a new WIOCSYS call.  This means that two processes can
compete for control of the special keys.  I ran into this when I was writing
a program which would "listen" for the function keys and then perform various
actions.  While I was writing the program I still had the phone manager
installed (I was using it as an online telephone directory) and whenever
anything happened which affected the phone lines (such as an incoming call),
the phone manager would wake back up again and reclaim control of the special
keys.  Eventually I was forced to remove the phone manager in order to preserve
my sanity.

The program I wrote is kinda neat if you are willing to sacrifice the phone
manager.  It lets you assign a program to each function key and when you press
one of the function keys it creates a new window, switches control to that
window, and then runs the specified program.  Windows can be either full-screen
borderless windows or smaller windows with borders and resize/move icons.  It's
nice to be able to press s-F7 and bring up Pcomm, or press s-F1 and bring up
a new shell so that I can check something without disturbing my editor session.

If anybody wants a copy, let me know.  If enough people respond I will post it.
Like I said above, you have to nuke the phone manager in order for it to work
properly.  Otherwise it gets into a WIOCSYS war with ph trying to decide who
has control over the function keys.  It's very annoying to press s-F7 and
instead of having Pcomm come up to have a window come up saying that you have
no number assigned to that key.
-- 
David H. Brierley
Home: dave at galaxia.Newport.RI.US   {rayssd,xanth,lazlo,jclyde}!galaxia!dave
Work: dhb at rayssd.ray.com           {sun,decuac,gatech,necntc,ukma}!rayssd!dhb



More information about the Comp.sys.att mailing list