wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

wiwarp.c (564B)


      1 /* Copyight 2008 Kris Maglione <maglione.k at Gmail>
      2  * See LICENSE file for license details.
      3  */
      4 #include <ctype.h>
      5 #include <stdarg.h>
      6 #include <stdbool.h>
      7 #include <string.h>
      8 #include <stuff/x.h>
      9 #include <stuff/util.h>
     10 #include <fmt.h>
     11 
     12 int
     13 main(int argc, char *argv[]) {
     14 	Point pt;
     15 
     16 	ARGBEGIN{
     17 	}ARGEND;
     18 
     19 	initdisplay();
     20 
     21 	if(argc) {
     22 		if(!getint(EARGF(exit(1)), &pt.x))
     23 			exit(1);
     24 		if(!getint(EARGF(exit(1)), &pt.y))
     25 			exit(1);
     26 	}else {
     27 		pt = querypointer(&scr.root);
     28 		lprint(1, "%d %d\n", pt.x, pt.y);
     29 	}
     30 
     31 	warppointer(pt);
     32 	XCloseDisplay(display);
     33 }
     34