Directing input to another app



Does anybody know how to manipulate widgets in another
X/GTK app from a GTK app?  I'm looking to do something
like xkeycaps' "Type at window".

First I do a gdk_pointer_grab, wait for a button_release
and get a GdkEventButton.  But now what?  

Questions:

1) How do I take a GdkEventButton and determine what
window was picked?  (I'm thinking I need to somehow use
the event's x_root and y_root.  In X, the XButtonEvent
provides the picked window id in the subwindow field).

2) How do I redirect the input to that picked window? 
(In xkeycaps, XSendEvent is used.)

Any ideas?


Thanks,
Brian






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]