Hello all,

trying to improve a little tool that captures movement on
X-Windows to video (e.g. for sw documentation purposes), I'm
trying to get it to capture the mouse pointer, too.

This seems far from easy (or I've been looking into the
wrong places )

If anybody know of an alternative to XGetImage to do the trick,
please tell me ...

Meantime I've been trying an alternative approach:

- get the mouse pointer coordinates with XQueryPointer() and
calculate the coordinates relative to the part of the
screen captured

- paint a mouse pointer into every frame ... either as some
arbitrary mouse pointer simulation (easy)
or preferrably as the real mouse pointer

The latter, again, seems not quite easy. Been thinking along
those lines:

- find what window the cursor is in
- loop through all know cursors and compare them to the cursor
the window defines using XTestCompareCursorWithWindow()

smth. like this:
xTest = XTestQueryExtension( XtDisplay(mjob->toplevel), &ev_base, &er_base, &major, &minor);
if ( xTest = True ) {
int n;

for (n = 0; n < (XC_num_glyphs - 1); n++) {
xTest = 0;

xCursor = XCreateFontCursor( XtDisplay(mjob->toplevel), n);
xTest = XTestCompareCursorWithWindow( XtDisplay(mjob->toplevel), childwindow, xCursor );
if (xTest = True ) printf("xTest: %i - glyph: %i\n", (int) xTest, n);
} else {
printf("XTEST extension not supported\n");

However, I always get XTestCompareCursorWithWindow return 1 for
whatever cursor I compare with in whatever window.

I'm probably doing smth. wrong ... haven't found LOADS of examples.

If anybody can give me a hint, or perhaps has a better idea, all
pointers, rtfms, etc. will be much appreciated.