BlackLight wrote:
> int setPointerPos (int x, int y)  {
>        Display *disp;
>        Window root;
>        Window father, child;
>        int screen;
>        int width = 1024; int height = 768;
> 
>        if (!(disp = XOpenDisplay(NULL)))
>                return -1;
> 
>        screen = DefaultScreen(disp);
>        root = RootWindow(disp,screen);
> 
>        if (!XWarpPointer(disp, father, child, 0, 0, width, height, x, y))
>                return -1;
> 
>        XCloseDisplay(disp);
>        return 0;
> }
> 
> and this is the problem I get when a face is detected and I try to
> move the cursor:


Aside of setting farther and child to root (and width, height to
zero), why not use XTestFakeMotionEvent()?

Extending your application by eye blink detector you could cleanly
implement mouse buttons by XTestFakeButtonEvent(), or even create a
complete "air keyboard".

Greetings,

    Eeri Kask

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to