[comp.windows.x] x11r2 xterm tek mode

rusty@VIOLET.BERKELEY.EDU (08/24/88)

I've been getting people here to switch from suntools to x11 but now
I've got an irate user whose discovered that xterm bombs when you try
to use tek mode.  Are there any fixes for this?  Or we could use some
program that displays tek output or even unix plot output.

moraes@godzilla.ele.toronto.EDU (Mark Moraes) (08/25/88)

We found a few small bugs in xterm's Tek mode -
	it doesn't work in reverse video
	it doesn't return the right mouse coordinates in GIN mode
	it returns the left and right buttons inverted in GIN

Here are the fixes we made - our tek users seem satisfied now.
(Early versions of twm, which changed the focus around themselves - it
still does if you don't have NoTitleFocus set - caused strange things
to happen when you created and later unmapped a tek window. That seems
ok now - but keep NoTitleFocus on)

*** /tmp/,RCSt1a13658	Thu Aug 25 15:15:33 1988
--- Tekproc.c	Thu Aug 25 15:15:35 1988
***************
*** 951,957
  	XQueryPointer(
  	    screen->display, TWindow(screen), 
  	    &root, &subw,
- 	    &mousex, &mousey,
  	    &winx, &winy,
  	    &mask);
  	if((mousex = (mousex - screen->border) / TekScale(screen)) < 0)

--- 951,956 -----
  	XQueryPointer(
  	    screen->display, TWindow(screen), 
  	    &root, &subw,
  	    &winx, &winy,
  	    &mousex, &mousey,
  	    &mask);
***************
*** 953,958
  	    &root, &subw,
  	    &mousex, &mousey,
  	    &winx, &winy,
  	    &mask);
  	if((mousex = (mousex - screen->border) / TekScale(screen)) < 0)
  		mousex = 0;

--- 952,958 -----
  	    screen->display, TWindow(screen), 
  	    &root, &subw,
  	    &winx, &winy,
+ 	    &mousex, &mousey,
  	    &mask);
  	if((mousex = (mousex - screen->border) / TekScale(screen)) < 0)
  		mousex = 0;
***************
*** 1111,1117
  
      screen->xorplane = 1;
  
!     screen->Tbackground = tw->core.background_pixel;
      screen->Tforeground = screen->foreground;
      screen->Tcursorcolor = screen->foreground;
  

--- 1111,1117 -----
  
      screen->xorplane = 1;
  
!     screen->Tbackground = term->core.background_pixel;
      screen->Tforeground = screen->foreground;
      screen->Tcursorcolor = screen->foreground;
  
*** /tmp/,RCSt1a13669	Thu Aug 25 15:16:18 1988
--- button.c	Thu Aug 25 15:16:19 1988
***************
*** 1234,1240
  	register int i;
  
  	if(screen->TekGIN) {
! 		i = "rml"[event->button - 1];
  		if(event->state & ShiftMask)
  			i = toupper(i);
  		TekEnqMouse(i | 0x80);	/* set high bit */

--- 1234,1240 -----
  	register int i;
  
  	if(screen->TekGIN) {
! 		i = "lmr"[event->button - 1];
  		if(event->state & ShiftMask)
  			i = toupper(i);
  		TekEnqMouse(i | 0x80);	/* set high bit */