[comp.windows.x] Has anyone fixed xfig and xdbx to work with Open Windows?

shaffer@athena.crd.ge.com (11/13/89)

I realize that this refers to one of the most asked questions,
but I am looking for specifics, and all my efforts to follow the
general suggestions I have seen posted in the past have failed.

I am using Sun's Open Windows X11/NeWS server.  Some programs do
not get input from the keyboard, e.g. xfig and xdbx.  (I fixed
xgone by adding XGrabKeyboard() -- send mail if you want the
diffs).  I know that the problem is caused by the client not
asking for input focus, and that adding a call to XSetWMHints()
should fix it.  I tried that at several points in xdbx, and got
runtime error messages.  I also tried setting XtNinput to True in
several argument lists -- didn't work.  I also tried the patch to
$OPENWINHOME/etc/NeWS/Xwmclient.ps mentioned in Sun's bug list
and in this group earlier -- it didn't work.  So I am asking
specifically -- if any one has gotten xdbx and xfig to work
under Open Windows, could you mail me the diffs?  I'll post the
results if I have success.

Thanks.

     Phillip L. Shaffer                        shaffer@crd.ge.com
     GE Corporate Research & Development       uunet!crd.ge.com!shaffer
     Building KW, Room D211
     P.O. Box 8, Schenectady NY 12301

shaffer@athena.crd.ge.com (11/16/89)

A couple of days ago I posted this query.  I got one response which
didn't answer the question, but a couple of other messages posted
gave me the information to do what I wanted.

There are two ways:

1) Fixes the problem in general (works for xfig, xdbx, and xman, at least):
   add to your ~/.Xdefaults file the line:
      *Input: true
   and restart xnews.

2) Patch the source code for xfig and xdbx (I tried xman and couldn't find
   the right place). In xdbx, patch the file windows.c thus:

120a121,129
>     /* ask window manager for input focus: */
>     {
>       XWMHints wmhints;
>       wmhints = XGetWMHints((XtDisplay(vpane), XtWindow(vpane));
>       wmhints.input = True;
>       wmhints.flags = InputHint;
>       XSetWMHints(XtDisplay(vpane), XtWindow(vpane), &wmhints);
>     }
> 

  In xfig, patch main.c similarly, after (around line 333) "XtRealizeWidget(tool);" only change "vpane" above to "tool".

     Phillip L. Shaffer                        shaffer@crd.ge.com
     GE Corporate Research & Development       uunet!crd.ge.com!shaffer
     Building KW, Room D211
     P.O. Box 8, Schenectady NY 12301