|
From: Ben A. <bpa...@ma...> - 2009-02-06 21:07:13
|
On Friday, February 06, 2009, at 12:38PM, "Petr Mikulik" <mi...@ph...> wrote: >> https://sourceforge.net/tracker/index.php?func=detail&aid=2570385&group_id=2055&atid=302055 >> [ 2570385 ] GPVAL_X11_WINDOWID >> >> > > 3. New global variable current_x11_windowid should be placed in an .h + .c >> > > file. Which one? >> > >> > > That will probably not work. There can be multiple x11 windows open at >> > > the same time, so there is no "current" one. Since you can associate a >> > > window number with each one, however, we might be able to do: >> > > set term x11 5 >> > > print TERM_X11_WINDOW_5_ID >> > >> > The current one is the current active one. It is the last one from "set term >> > x11". The value of GPVAL_TERM_WINDOWID is to be used by a front-end (such as >> > Octave) using gnuplot for drawings; thus, it can fetch the Window ID just >> > after the plot command. >> >> But "set term x11 5" will not necessarily open a new window; it will re-use >> the old window #5 if there is one. So it will not necessarily trigger a >> window creation event, and thus would not automatically update your proposed >> *_CURRENT_* variable. I suppose the terminal driver could maintain a list >> of previously-created window ids. > >It does update the GPVAL_TERM_WINDOWID variable, please try the proposed >patch. > Petr, I've build gnuplot with the current sources and with your patch applied. Terminal type set to 'x11' gnuplot> plot sin(x) gnuplot> gplt_x11.c:1528: SENDING MY WINDOWID TO GNUPLOT... mouse.c:1854: set current_x11_windowid to 12345 When I try a "show all" I do not see any variables that look like GPVAL_TERM_WINDOWID. In fact, I don't see any variables beginning with "GPVAL_...". I'm obvioulsy missing something. Ben |