[Xcb-commit] xcb-demo/tests julia.c,1.3,1.4 lissajoux.c,1.4,1.5

Bart Massey xcb-commit at lists.freedesktop.org
Sun Dec 11 14:30:19 PST 2005


Update of /cvs/xcb/xcb-demo/tests
In directory gabe:/tmp/cvs-serv2516/tests

Modified Files:
	julia.c lissajoux.c 
Log Message:
Fixed deprecations, by rewriting XCBConnectBasic() and
XCBWaitEvent() calls.



Index: julia.c
===================================================================
RCS file: /cvs/xcb/xcb-demo/tests/julia.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- julia.c	2 Apr 2005 18:22:07 -0000	1.3
+++ julia.c	11 Dec 2005 22:30:17 -0000	1.4
@@ -127,9 +127,10 @@
   CARD32           valwin[3];
   XCBRECTANGLE     rect_coord = { 0, 0, W_W, W_H};
   XCBGenericEvent *e;
+  int screen_num;
   
-  data.conn = XCBConnectBasic ();
-  screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (data.conn)).data;
+  data.conn = XCBConnect (0, &screen_num);
+  screen = XCBAuxGetScreen (data.conn, screen_num);
   data.depth = XCBAuxGetDepth (data.conn, screen);
 
   win.window = screen->root;
@@ -182,7 +183,7 @@
 
   XCBSync (data.conn, 0); 
 
-  while ((e = XCBWaitEvent(data.conn)))
+  while ((e = XCBWaitForEvent(data.conn)))
     {
       switch (e->response_type)
 	{ 

Index: lissajoux.c
===================================================================
RCS file: /cvs/xcb/xcb-demo/tests/lissajoux.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- lissajoux.c	2 Apr 2005 18:22:07 -0000	1.4
+++ lissajoux.c	11 Dec 2005 22:30:17 -0000	1.5
@@ -171,6 +171,7 @@
   XCBRECTANGLE     rect_coord = { 0, 0, W_W, W_H};
   XCBGenericEvent *e;
   int              try_shm;
+  int              screen_num;
   
   try_shm = 0;
 
@@ -187,8 +188,8 @@
   if (try_shm != 0)
     try_shm = 1;
 
-  data.conn = XCBConnectBasic ();
-  screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (data.conn)).data;
+  data.conn = XCBConnect (0, &screen_num);
+  screen = XCBAuxGetScreen(data.conn, screen_num);
   data.depth = XCBAuxGetDepth (data.conn, screen);
 
   win.window = screen->root;



More information about the xcb-commit mailing list