Take over another apps window
glynn at gclements.plus.com
Mon May 21 19:25:28 PDT 2007
Enrico Weigelt wrote:
> is it possible that some X application takes over another one's
> window (with its cooperation) ?
You can mostly take over a window without any cooperation from the
creator, so long as you can get its XID. X functions which accept an
XID (Window, Drawable, Pixmap etc) don't require that the client
created the entity itself.
The only "cooperation" you really need from the creator is for it to
refrain from performing conflicting operations on the window.
If you want to receive events for the window, use XSelectInput() to
select the desired events; windows have a separate event mask for each
client. One gotcha: only one client can select ButtonPressMask at any
given time (the same is true of the redirect masks, but those are
really only relevant if you're writing a window manager).
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg