weird XTestCompareCursorWithWindow
Jochen Baier
Jochen.Baier at stud.uni-karlsruhe.de
Sun Jul 31 17:53:50 PDT 2005
hi,
i want to test if a given window id has XC_xterm cursor shape set.
the test only works with the orignal cursor. see example:
int main( int argc, char * argv[])
{
XEvent event;
Display *display;
Window window;
display = XOpenDisplay(NULL);
Cursor cursor1=XCreateFontCursor(display, XC_xterm);
Cursor cursor2=XCreateFontCursor(display, XC_xterm);
window= XCreateSimpleWindow(display, DefaultRootWindow(display), 0, 0,
100, 100, 0, 0, 0);
XDefineCursor (display, window, cursor1);
XMapWindow (display, window);
XSync(display, False);
//work
if (XTestCompareCursorWithWindow(display, window, cursor1))
printf ("found xterm cursor\n");
//dont work
if (XTestCompareCursorWithWindow(display, window, cursor2))
printf ("found xterm cursor\n");
XNextEvent (display, &event);
return 0;
}
is this result proposed ?
thanks for all hints, jochen
More information about the xorg
mailing list