jlo@crosby.phx.mcd.mot.com (Joe Ortiz) (11/07/89)
I've seen some strange behavior with xterm and xmodmap. If xmodmap is executed within a particular xterm, and the mouse is in the window, everything works great. If xmodmap is executed within a particular xterm, and the mouse is moved outside the window while a sleep executes before the xmodmap, it does not work. Ah, it is related to the mouse. But, if xmodmap is executed from another xterm, and the mouse is moved to the original xterm window while a sleep executes before the xmodmap, it does not work either. I thought it may have something to do with where the mouse is, but I guess not. Well, xterm always gets the MappingNotify event but sometimes the X toolkit will not execute the routine that xterm registered for non-maskable events. The Xt routine DispatchEvent, in Event.c is executed in both the working and non-working case. Near the end of the routine is code which searches widget->core.event_table looking for routines. It finds the correct routine sometimes, but other times it does not. Any ideas? When should xmodmap work? Why does the toolkit appear to change the xterm widget's event_table and thus fail to execute the correct event handler?
swick@ATHENA.MIT.EDU (Ralph R. Swick) (11/08/89)
> It finds the correct > routine sometimes, but other times it does not. I'm not sure I believe (or understand) your analysis, but there was a bug in Xt in R3 that would somtimes cause it to fail to update its keyboard mapping tables. This was specific to the internal handling of MappingNotify. Fixed in R4.