changing window focus with cusor on x-windows [message #68447] |
Fri, 23 October 2009 13:41 |
Enemy of the State
Messages: 4 Registered: January 2008
|
Junior Member |
|
|
Greetings IDL comrades.
I'm working on an x-windows system (OS X). I've been trying to figure
out a way to change the window focus, but haven't made any progress.
Here's the basic idea:
window,0
plot,findgen(10),findgen(10)
...code to save all the !p variables in an array
window,1
plot,findgen(20),findgen(20)
... code to save !p variables....
cursor,ix,iy
;the cursor is clicked on window 1
... code to change window focus here, ie,
...print,!d.window prints a 1
... code that does stuff in window 1
Just to make sure I'm being clear on this, instead of doing
wset,1
I'd like to be able to change the focus to window 1 by clicking on
it.
It seems like this would be possible, and not even very hard to do,
since the window is bring brought to the foreground. Either IDL or the
OS must know which window was clicked on..... However, I'm stumped.
Thanks,
Mark
|
|
|