Omer Zak wrote:

OK, I'll bite even though I know of no such utility.
I assume that you are using X-Window server, but without any window
manager.
1. Find or develop an utility for simulating mouse events and delivering
them to X-Window.  Then use mouse events to change focus.
2. Find or write a very simple window manager, which knows to switch
focus by commands via a FIFO, to which your command line utility writes.
3. Is it possible to write a simple application which calls XSendEvent()
with suitable events?

1 and 3 will simply not work. Without a window manager there are just two options. The X default is that the focus follows the mouse. Changing this default will lead to the focus hanging on a certain window until changed via the API. There is no mouse or keyboard sequence to tell X to switch focus to another window. This is 100% the window manager's task.

As for 2, it will work, but it is probably a gross overkill.

How do you intend to identify the window that is to receive focus? Do you have its Window ID? Do you want to do it by screen coordinates?

If the former, RTFM the XSetInputFocus command. Aside from the overheads (opening the X session), this is a one function command, and should be fairly straight forward. Be warned, however, that it may very well not work if a window manager happens to be running, as a window manager has total veto power over any command affecting, well, windows (size, display/hide, move etc.), so if you are trying to test it with KDE or Gnome running, and it does nothing, don't despair. Try it again with no window manager.

Shachar

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to