|
From: Ethan M. <merritt@u.washington.edu> - 2006-04-25 18:03:56
|
I'm getting tired of going through the SourceForge patches interface, so I'm pulling this over to normal Email. Timoth=E9e wrote> >So the trick can be : >* check for WINDOWID, if it is set go on and use the x11 code But you can't use the existing code, because as you point out yourself the external program gnuplot_x11 is not running if the current terminal is set to wx or pm. And if you pull the code out of gnuplot_x11 and put it in=20 the core code, well.. that's crazy. There should be no X dependence in the core code. Particularly if we all switch over and use the wxWidgets terminal, since we wouldn't even need to build in the x11 terminal at all :-) :-) >* if WINDOWID is not set, do : > HSWITCH hswitch =3D WinQuerySwitchHandle(0,getpid()); > then check for errors with WinGetLastError, which would =20 > mean that the console window is not managed by PM, and > continue with WinSwitchToProgram if it's ok. WINDOWID not set can mean many things. It certainly is not proof that you are not running on x11. Let me give you a real-world example, one that I encounter almost every day. I work from home in the evening, but often log in to the lab computers to do so. In that case I am=20 running in an xterm session *on my home computer*, from which I have used ssh to log in to a lab computer. If I need to check a job result quickly, I will run gnuplot on the lab computer with the display set back to my home machine. But there is no WINDOWID in gnuplot's environment because it is not running on the same machine as the window it is running in. =20 =46urthermore, even when sitting at my desk in the lab, I often ssh to other machines and use gnuplot over the ssh link. Again WINDOWID does not exist, or if it does it points to a window on the wrong X-server. =20 This whole mechanism *DOES NOT WORK* in the general case, and by that I mean in my normal daily use. Petr:=20 You obviously are running gnuplot in a certain configuration where this "raise window XXX" makes sense, so you think everything is functions reasonably. But it doesn't. Really it doesn't. I think we should remove it and try to find a different way of doing what you want. Can we step back and start over again with a clear=20 statement of what is the capability that you need? Maybe it requires a Raise event and maybe it doesn't. Labels? Spatial proximity? Tabbed windows?=20 Color-coded windows? =2D-=20 Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle WA |