|
From: Petr M. <mi...@ph...> - 2009-02-06 17:38:19
|
> 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. --- PM |