[comp.windows.x] SparcStation

gilley@ndl.COM (Greg Gilley) (10/20/89)

Has anyone gotten xrn or xtrek (or any X application) to run properly
under sun's X11/NeWS 1.0 release?  I keep getting a message about input
queue lock broken and none of my apps will accept any keyboard input.
Any and all help will be greatly appreciated.  Thanks,
						Greg
-------------------------------------------------------
  Greg Gilley
  gilley@ndl.COM   [Numerical Design Limited]
  919-929-2917 (voice)

jlo@elan.elan.com (Jeff Lo) (10/22/89)

In article <8910201450.AA00282@orzo.ndl.com> gilley@ndl.COM (Greg Gilley) writes:
>Has anyone gotten xrn or xtrek (or any X application) to run properly
>under sun's X11/NeWS 1.0 release?  I keep getting a message about input
>queue lock broken and none of my apps will accept any keyboard input.
>Any and all help will be greatly appreciated.  Thanks,

Try adding a call to XSetWMHints() to set the input hint.  Something
like this should do the trick:

	XWMHints wmhints;

	wmhints.input = True;
	wmhints.flags = InputHint;
	XSetWMHints(display, window, &wmhints);

-- 
Jeff Lo, Elan Computer Group, Inc.
jlo@elan.com, ..!{ames,uunet}!elan!jlo
888 Villa Street, Third Floor, Mountain View, CA 94041, 415-964-2200

salzman%iris@RAND.ORG (Isaac) (10/23/89)

>In article <8910201450.AA00282@orzo.ndl.com> gilley@ndl.COM (Greg Gilley) writ
>es:
>>Has anyone gotten xrn or xtrek (or any X application) to run properly
>>under sun's X11/NeWS 1.0 release?  I keep getting a message about input
>>queue lock broken and none of my apps will accept any keyboard input.
>>Any and all help will be greatly appreciated.  Thanks,

>Try adding a call to XSetWMHints() to set the input hint.  Something
>like this should do the trick:


the above suggestion is the right way to fix things. but, there's something
else you can do if you don't want to go hacking the source code and
rebuilding all those app's. just change the value of SetFocusForClient? to
true in $OPENWINHOME/etc/NeWS/Xwmclient.ps:  (here's a context diff - the
comments in the code tell the story):

*** Orig/Xwmclient.ps	Sun Oct 22 09:23:14 1989
--- Xwmclient.ps	Sun Oct 22 09:25:50 1989
***************
*** 1744,1752 ****
  	    % We could set SetFocusForClient? to true here, so that dumb
  	    % X clients that don't set hints properly can still make use
  	    % of the keyboard.  However, this seems rather dubious.
  	    %
! 	    /SetFocusForClient? false def
  	} ifelse
  
  	SetFocusForClient? TakeFocus? not and {
  	    /canvas self send addprechildfocusclient
--- 1744,1752 ----
  	    % We could set SetFocusForClient? to true here, so that dumb
  	    % X clients that don't set hints properly can still make use
  	    % of the keyboard.  However, this seems rather dubious.
  	    %
! 	    /SetFocusForClient? true def
  	} ifelse
  
  	SetFocusForClient? TakeFocus? not and {
  	    /canvas self send addprechildfocusclient

------

as the comments say - it's the client's responsibility to ask for input
focus, so making that change in the X11/NeWS server is really a hack. the
fact is, most X clients are ill behaved when it comes to some of the more
subtle things like asking for input focus. this is specified in the ICCCM,
which was not complete when most of these app's were originally written.
X11/NeWS is extremely ICCCM conscious (gee, i wonder if it has to do with
the fact that the ICCCM author worked on X11/NeWS :-) where most current X
app's and window managers aren't (yet). i assume that will change in R4....

--
* Isaac J. Salzman                                            ----     
* The RAND Corporation - Information Sciences Dept.          /o o/  /  
* 1700 Main St., PO Box 2138, Santa Monica, CA 90406-2138    | v |  |  
* AT&T      : +1 213-393-0411 x6421 or x7923 (ISL lab)      _|   |_/   
* Internet  : salzman@rand.org                             / |   |
* UUCP      : !uunet!rand.org!salzman                      | |   |