Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!nisca.ircc.ohio-state.edu!lvd1.bme.ohio-state.edu!alex From: alex@lvd1.bme.ohio-state.edu (Alex Savchenko) Newsgroups: comp.windows.x Subject: Re: Focus in DECwindows ??? Message-ID: <2778@nisca.ircc.ohio-state.edu> Date: 13 Jul 90 20:50:42 GMT References: <1427@shodha.dec.com> Sender: news@nisca.ircc.ohio-state.edu Reply-To: alex@lvd1.bme.ohio-state.edu (Alex Savchenko) Organization: Biomedical Engineering OSU Lines: 71 In article <1427@shodha.dec.com>, west@gsrc.dec.com (Jim West (Stealth Contractor)) writes: > - > -Thanks > > Here's a hack program that will do what you want. It goes against the > grain of the DECwindows window manager...but it does work. > > NOTE: Totally %100 UNSUPPORTED !! > > Sorry, Jim, I couldnt reach you by e-mail. Thanks so much for this program! It really works! I think Steve is not the only one who is annoyed by dxwm behavior. Me too! I ported it to my evironment: DS3100, Ultrix Worksystem V2.1 (Rev. 14) XR3. In order this program to work here I had to make slight changes which can be useful if someone will port it to similar environment. Though this is 100% unsupported code, I want to offer a patch (just so) :-) --------------------------------------------------- cut here *** autofocus.old Fri Jul 13 15:58:30 1990 --- autofocus.c Fri Jul 13 15:53:18 1990 *************** *** 3,12 **** Author: Dave Burleigh */ #include - #include #ifdef vms #include #include #include #else --- 3,12 ---- Author: Dave Burleigh */ #include #ifdef vms + #include #include #include #include #else *************** *** 33,41 **** --- 33,48 ---- int nchildren,i; /* Open the default display */ + #ifdef vms strcat(strcpy(display_name,getenv("SYS$NODE")),"0"); + #else + { + register char *node; + strcpy(display_name, (node = getenv("DISPLAY"))? node : ":0.0"); + } + #endif if (!(display = XOpenDisplay(display_name))) { fprintf(stderr,"Can't open display\n"); exit(0); ----------------------------------------------------------------------- Thanks again, ---- alex