From: Daniel J S. <dan...@ie...> - 2007-05-31 21:03:21
|
Ethan Merritt wrote: > 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 easy >>>fix means a big regression; 'q' and ' ' would not always work anymore, but >>>only when the terminal is the active one. >> >>'q' and ' ' should work as they are. It is sufficient and a very clean way >>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ée 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 > delivered to the core gnuplot routines, and so they cannot be handled > by the normal "bind" mechanism. Isn't that what the "allwindows" setting is for? 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. You're saying that because the terminal was changed, the term->xxxx mechanism will point to the terminal the window is not part of. Can the terminal pointer be saved somewhere, or would that require a new system of linked lists? Dan |