[3974] in Athena Bugs
Emacs visual bell
daemon@ATHENA.MIT.EDU (John Carr)
Sun Jan 14 04:41:28 1990
To: bugs@ATHENA.MIT.EDU
Date: Sun, 14 Jan 90 04:41:09 EST
From: John Carr <jfc@ATHENA.MIT.EDU>
The visual bell inverts the pixel values of the emacs window. This is
not the correct thing to do on a color display. Emacs should xor the
screen with the xor of the foreground and background colors.
Here are patches to the file "src/x11term.c" found in the "emacsdev"
filesystem. It also contains corrections for some pointer type
mismatches (discovered by building with X11R4, which has function
prototypes to the X library).
*** /mit/emacs/src/x11term.c Wed Aug 9 19:47:08 1989
--- x11term.c Sun Jan 14 04:29:38 1990
***************
*** 38,43 ****
--- 38,47 ----
static char *rcsid_xterm_c = "$Header: x11term.c,v 1.12 88/02/29 14:11:07 rfrench Exp $";
#endif lint
+ #ifdef __HIGHC__
+ pragma on(POINTERS_COMPATIBLE);
+ #endif
+
/* On 4.3 this loses if it comes after x11term.h.
On hp-ux it loses if it comes after config.h. */
#include <signal.h>
***************
*** 658,665 ****
BLOCK_INPUT ();
XXgc_temp = XCreateGC(XXdisplay, XXwindow, 0, &gcv_temp);
! XSetState(XXdisplay, XXgc_temp, WhitePixel (XXdisplay, XXscreen),
! BlackPixel(XXdisplay, XXscreen), GXinvert,
AllPlanes);
XFillRectangle (XXdisplay, XXwindow, XXgc_temp, 0, 0,
--- 662,670 ----
BLOCK_INPUT ();
XXgc_temp = XCreateGC(XXdisplay, XXwindow, 0, &gcv_temp);
! XSetState(XXdisplay, XXgc_temp,
! XXemacswidget->local.foreground ^ XXemacswidget->local.background,
! BlackPixel(XXdisplay, XXscreen), GXxor,
AllPlanes);
XFillRectangle (XXdisplay, XXwindow, XXgc_temp, 0, 0,
***************
*** 1308,1314 ****
break;
case MappingNotify:
! XRefreshKeyboardMapping(&event);
break;
case Expose:
--- 1313,1319 ----
break;
case MappingNotify:
! XRefreshKeyboardMapping(event);
break;
case Expose:
***************
*** 1655,1661 ****
{
BLOCK_INPUT_DECLARE ();
Arg arglist[20];
! int pr, xpos, ypos, width, height, i;
char newgeom[256];
/* minWidth, minHeight, maxWidth, maxHeight, widthInc, heightInc,
--- 1660,1667 ----
{
BLOCK_INPUT_DECLARE ();
Arg arglist[20];
! int pr, xpos, ypos, i;
! unsigned int width, height;
char newgeom[256];
/* minWidth, minHeight, maxWidth, maxHeight, widthInc, heightInc,