#include #include #include #include int main(int argc, char **argv) { Display *display; Window root; int x, y; unsigned int width, height, border_width, depth; if ((display = XOpenDisplay(NULL)) == NULL) { fprintf(stderr, "cannot open display\n"); exit(1); } root = DefaultRootWindow(display); XGetGeometry(display, root, &root, &x, &y, &width, &height, &border_width, &depth); XWarpPointer(display, 0, root, 0, 0, 0, 0, width, height); XCloseDisplay(display); exit(0); }