|
From: <tim...@en...> - 2006-04-26 17:27:53
|
> You are relying on a fragile mechanism that happens to > work on a common configuration. But "common" is a very long > way from universal. As I said, I use gnuplot + x11 every day, > and every day at least some of those uses do not follow > the model you are assuming. If the feature is truely useful, > then let us try to find a way to make it work for more > cases than it does now. > > -- > Ethan A Merritt There is something basically strange in this feature : it involves to control a console, which is not guaranteed to be in a managed window, except on Windows. Currently, we rely on WINDOWID for xterm and xterm-like, with a special case for konsole, because Petr has been willing to implement it. This implies to link 'something' with Xlib. I have found another poor alternative : using xterm control sequences. If you look at this page : http://www.xfree86.org/snapshot/ctlseqs.html or http://www.isri.unlv.edu/~slumos/hacks/xtctl , you will find that xterm understand the sequence "=1B[5t" as "raise the window", when xterm is in VT100 mode (Does it mean that it won't work if xterm is in a different mode ? I'm not sure of this.) For example, try the attached script (where I replaced 5 by 6) from a xterm : it will lower the window. That means that we can use something like system(echo -n "<something>") t= o handle this instead of linking with Xlib. Of course, it may not work on other terminals (gnome ?, rxvt ?). It does not work on konsole, but we already have a special case for konsole, using dcop. In any case, the current patch has a drawback : it relies on the processing of terminal events by the core, so as far as I understand, the spacebar would only work when the interactive terminal is the one currently active in gnuplot. This may be considered as a regression compared to the current behaviour. Petr, as you seem to be the only one using it, do you think it is a regression ? On the short-run, I may let it in the wxWidgets terminal as it is currently : has to be linked with Xlib (or gdk, as it is already needed for raise_plot_window_but_don_t_give_it_the_focus ), or Windows.h (not a problem), or os2.h (not a problem either). Any other idea ? Timoth=E9e |