Path: utzoo!attcan!uunet!snorkelwacker!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU (der Mouse) Newsgroups: comp.windows.x Subject: X programs without events Message-ID: <8910300603.AA06783@Larry.McRCIM.McGill.EDU> Date: 30 Oct 89 06:03:48 GMT Sender: root@bloom-beacon.MIT.EDU Organization: The Internet Lines: 49 Just in case someone still thinks that an X program must handle events to be useful, I offer the following, which I wrote because I wanted the functionality and couldn't find an existing tool for it. As its author, I hereby place this program into the public domain. It's simple enough anyway that it's a little silly to try to claim ownership of it. I call it xwarp. #include #include #include char *displayname = 0; Display *disp; main(ac,av) int ac; char **av; { char *pgm; pgm = av[0]; if ((ac >= 3) && !strcmp(av[1],"-display")) { displayname = av[2]; av += 2; ac -= 2; } if (ac != 3) { fprintf(stderr,"Usage: %s [-display ] \n",pgm); exit(1); } disp = XOpenDisplay(displayname); if (disp == 0) { fprintf(stderr,"%s: can't open display %s\n",pgm,XDisplayName(displayname)); exit(1); } XWarpPointer(disp,None,XRootWindowOfScreen(XDefaultScreenOfDisplay(disp)),0,0,0,0,atoi(av[1]),atoi(av[2])); XCloseDisplay(disp); exit(0); } der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu