Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 1996 00:04:40 +0100 (BST)
From:      Tom Crummey <tom@tompc.sos.bangor.ac.uk>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/1742: Various bugs in xview-3.2.1
Message-ID:  <199610082304.AAA12512@tompc.sos.bangor.ac.uk>
Resent-Message-ID: <199610082330.QAA15909@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         1742
>Category:       ports
>Synopsis:       Various bugs in xview-3.2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Oct  8 16:30:02 PDT 1996
>Last-Modified:
>Originator:     Tom Crummey
>Organization:
School of Electrical Engineering and Computer Systems
                 University of Wales, Bangor
>Release:        FreeBSD 2.2-CURRENT i386
>Environment:

	Pentium P100, 16MB RAM, Diamond Stealth 2MB DRAM Adaptec 2940 SCSI
	2G drive, ATAPI CDROM.

>Description:

1.	olwm doesn't recognise TrueColor visuals and so uses a monochrome
	colourmap.

2.	xview shelltools and commandtools will crash if the numlock key is
	on and anything is typed in the shelltool or commandtool window.

3.	programs (such as vi) that require the arrow keys will get ESC [214z
	instead of ESC [A etc. in a shelltool.

>How-To-Repeat:

1.	Run olwm on a true colour visual and notice that the background is
	grey and the some menus can't be seen properly.

2.	run a shelltool, (under olwm window manager) and press numlock, then
	press any other key while in the shelltool window. The shelltool 
	will crash and the console will show an X error message.

3.	run a shelltool (as above) and run vi on file. Use the arrow keys
	and notice that the cursor does not move and alot of [215z sequences
	appear in the mode line.

>Fix:
	
1.

diff -c /usr/ports/x11/xview-config/work/xview3.2p1-X11R6/clients/olwm/screen.c screen.c
*** /usr/ports/x11/xview-config/work/xview3.2p1-X11R6/clients/olwm/screen.c	Tue Oct  8 23:31:04 1996
--- screen.c	Mon Jan  1 23:54:12 1996
***************
*** 220,225 ****
--- 220,226 ----
  		     	case PseudoColor:
  			case GrayScale:
  		     	case DirectColor:
+ 			case TrueColor:
  		    		return True;
  				/*NOTREACHED*/
  		    		break;

2.


*** /usr/ports/x11/xview-config/work/xview3.2p1-X11R6/lib/libxview/win/win_input.c	Tue Oct  8 22:51:45 1996
--- win_input.c	Wed Apr 17 02:26:55 1996
***************
*** 854,860 ****
  #ifdef X11R6
  	/* lumpi@dobag.in-berlin.de */
  		int ksym_pcc;
! 		XGetKeyboardMapping(display,NoSymbol,0,&ksym_pcc);
  		for (index = 0; index < ksym_pcc; index++) {
  #else
  		for (index = 0; index < display->keysyms_per_keycode; index++) {
--- 854,862 ----
  #ifdef X11R6
  	/* lumpi@dobag.in-berlin.de */
  		int ksym_pcc;
! 		int tc_min_keycode, tc_max_keycode;
! 		XDisplayKeycodes(display, &tc_min_keycode, &tc_max_keycode);
! 		XGetKeyboardMapping(display,tc_min_keycode,tc_max_keycode-tc_min_keycode-1,&ksym_pcc);
  		for (index = 0; index < ksym_pcc; index++) {
  #else
  		for (index = 0; index < display->keysyms_per_keycode; index++) {
***************
*** 862,868 ****
  		    if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
  			if (IsKeypadKey(ksym)) {
  			    /* See if key has been rebound. */
! 			    if (!translate_key(display, ksym, ek->state,
  					       buffer, BUFFERSIZE)) {
  			        (void)win_translate_KP_keysym(ksym, buffer);
  			    }
--- 864,870 ----
  		    if ((ksym = XLookupKeysym(ek, index)) != NoSymbol)
  			if (IsKeypadKey(ksym)) {
  			    /* See if key has been rebound. */
! 			    if (translate_key(display, ksym, ek->state,
  					       buffer, BUFFERSIZE)) {
  			        (void)win_translate_KP_keysym(ksym, buffer);
  			    }
***************
*** 2721,2728 ****
   * Xlib's.
   */
  
! #ifdef X11R6
! /* lumpi@dobag.in-berlin.de */
  static int
  translate_key(dpy, symbol, modifiers, buffer, nbytes)
      Display 		*dpy;
--- 2723,2732 ----
   * Xlib's.
   */
  
! #ifdef X11R6 
! /* lumpi@dobag.in-berlin.de  
!    tom@sees.bangor.ac.uk this replacement for X11R6 doesn't work. At least 
!    it should now return sensible values though. */
  static int
  translate_key(dpy, symbol, modifiers, buffer, nbytes)
      Display 		*dpy;
***************
*** 2732,2742 ****
      int 		 nbytes;
  {
  	/* This is _very_ rude ! */
! 	strcpy(buffer,XKeysymToString(symbol));
  }
  
- #else
  
  static int
  translate_key(dpy, symbol, modifiers, buffer, nbytes)
      Display 		*dpy;
--- 2736,2753 ----
      int 		 nbytes;
  {
  	/* This is _very_ rude ! */
! 	char *string;
! 	string = XKeysymToString(symbol);
!      	if (string) {
! 		strncpy(buffer,XKeysymToString(symbol),nbytes);
! 		return(strlen(buffer));
! 	}
! 	else
! 		return 0;
  }
  
  
+ #else
  static int
  translate_key(dpy, symbol, modifiers, buffer, nbytes)
      Display 		*dpy;
***************
*** 2762,2765 ****
      }
      return 0;
  }
! #endif
--- 2773,2776 ----
      }
      return 0;
  }
! #endif 

3.


*** /usr/ports/x11/xview-config/work/xview3.2p1-X11R6/lib/libxview/ttysw/tty_mapkey.c	Tue Jun 29 06:17:20 1993
--- tty_mapkey.c	Tue Jan 16 23:58:56 1996
***************
*** 500,506 ****
   * have more time.
   */
  
! #ifdef i386
  static void
  ttysw_arrow_keys_to_string(xv_id, str)
      unsigned        xv_id;
--- 500,506 ----
   * have more time.
   */
  
! #if defined(i386) && !defined (__FreeBSD__)
  static void
  ttysw_arrow_keys_to_string(xv_id, str)
      unsigned        xv_id;
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610082304.AAA12512>