[Gridflow-cvs] [svn] commit: r6457 - /trunk/src/x11.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Fri Dec 17 10:42:11 EST 2010


Author: matju
Date: Fri Dec 17 10:42:09 2010
New Revision: 6457

Log:
adding query_pointer

Modified:
    trunk/src/x11.cxx

Modified: trunk/src/x11.cxx
==============================================================================
--- trunk/src/x11.cxx (original)
+++ trunk/src/x11.cxx Fri Dec 17 10:42:09 2010
@@ -272,6 +272,16 @@
 	\decl 0 loadbang () {out[0](gensym("nogrey"),0,0);}
 //	\decl 0 raise ();
 	\grin 0 int
+// 9.13 :
+	\decl 0 query_pointer () {
+		Window root_r, child_r;
+		int root_x, root_y, win_x, win_y;
+		unsigned mask;
+		if (XQueryPointer(display,window,&root_r,&child_r,&root_x,&root_y,&win_x,&win_y,&mask))
+			report_pointer(win_y,win_x,mask);
+		else
+			out[0](gensym("oops"),0,0);
+	}
 };
 
 /* ---------------------------------------------------------------- */



More information about the Gridflow-cvs mailing list