From: Ethan M. <merritt@u.washington.edu> - 2007-05-31 20:47:38
|
On Thursday 31 May 2007 13:39, Petr Mikulik wrote: > > I'll repeat myself, maybe you lost it in the noise of my message: The e= asy > > fix means a big regression; 'q' and ' ' would not always work anymore, = but > > only when the terminal is the active one. >=20 > 'q' and ' ' should work as they are. It is sufficient and a very clean wa= y=20 > to switch them on/off by a term->xxxx() command I proposed earlier. Petr: It is not as simple as you make it sound. Consider the example Timoth=E9e already mentioned. You have an old x11 plot window open, but the current terminal is something else. Maybe wxt, maybe postscript, ... whatever. In this state, keystroke events in the old x11 plot window will not be=20 delivered to the core gnuplot routines, and so they cannot be handled by the normal "bind" mechanism. We work around this by having gnuplot_x11 handle 'q' locally, but this requires treating it as a special case. If we move the 'q' response into the normal event_keypress() code in mouse.c, it will no longer be possible to close plot windows opened by a previous terminal type. In other words, the problem is not lack of a term->xxxx() mechanism. The problem is in receiving the keystroke event notification. =2D-=20 Ethan A Merritt |