Get focus to back to terminal

Dear all,

I have a root macro which mainly runs on the command prompt and reads user input via cin. However, at one point the user can select a parameter value by clicking onto a canvas which shows a corresponding histogram. The click is processed by an Exec function that stores the mouse coordinates for further use.

Now the problem: After the click, the canvas window of course has the input focus. Therefore, the user has to click back into the terminal window to be able to give further input on the command line. Is there a way to get the focus back to the terminal automatically after the click has been processed?

Would be sufficient if the solution worked with X11.

Thanks a lot for any hint,

Jens

Hi Jens,

There is nothing specific in ROOT to achieve this, and I don’t know how this could be done with X11, but if I find something I’ll let you know

Cheers, Bertrand.