On Mon, Jul 26, 2010 at 08:41:08PM -0300, Fabian Ezequiel Gallina wrote:
> Sólo porque es divertido:
for fun and profit !! (lo que es estar al pedo !!!)


#include <X11/Xlib.h>
#include <stdlib.h>
#include <stdio.h>

int main (void) {
    Display *dpy;
    Screen *scr;
    int ancho, alto;

        /* Abrimos el display por defecto */
    dpy = XOpenDisplay(NULL);
    if (!dpy) {
        fprintf(stderr, "No se pudo abrir el display");
        exit(7);
    }

    /* Ahora, obtenemos el ancho y el largo del screen por defecto */
    scr   = DefaultScreenOfDisplay(dpy);
    alto  = HeightOfScreen(scr);
    ancho = WidthOfScreen(scr);

    /* Finalmente, movemos el mouse */
    XWarpPointer(dpy, None, None, 0, 0, 0, 0, ancho, alto);
    XSync(dpy, 0);

    return(EXIT_SUCCESS);
}
                                                                            

emili...@merlot:~$ gcc -L/usr/lib -lX11 warp.c -o warp
emili...@merlot:~$ ./warp


Saludos
Emiliano
_______________________________________________
Lugro mailing list
[email protected]
http://lugro.org.ar/mailman/listinfo/lugro

Responder a