[Xorg-commit] xc/programs/xdpyinfo xdpyinfo.c,1.1.4.2,1.1.4.3

Kaleb Keithley xorg-commit at pdx.freedesktop.org
Fri Dec 19 01:16:53 EET 2003


Committed by: kaleb

Update of /cvs/xorg/xc/programs/xdpyinfo
In directory pdx:/home/kaleb/xorg/xc.XORG-CURRENT/programs/xdpyinfo

Modified Files:
      Tag: XORG-CURRENT
	xdpyinfo.c 
Log Message:
/home/kaleb/xin.commsg

Index: xdpyinfo.c
===================================================================
RCS file: /cvs/xorg/xc/programs/xdpyinfo/xdpyinfo.c,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- xdpyinfo.c	26 Nov 2003 22:49:11 -0000	1.1.4.2
+++ xdpyinfo.c	18 Dec 2003 23:16:51 -0000	1.1.4.3
@@ -67,7 +67,7 @@
 #ifdef XRENDER
 #include <X11/extensions/Xrender.h>
 #endif
-#ifdef PANORAMIX
+#ifdef XINERAMA
 #include <X11/extensions/Xinerama.h>
 #endif
 #include <X11/Xos.h>
@@ -971,7 +971,7 @@
 #endif /* XRENDER */
 
 
-#ifdef PANORAMIX
+#ifdef XINERAMA
 
 static int
 print_xinerama_info(Display *dpy, char *extname)
@@ -983,25 +983,27 @@
   
   print_standard_extension_info(dpy, extname, majorrev, minorrev);
 
-  if (!XineramaIsActive(dpy)) {
+  if (!XineramaActive(dpy, DefaultRootWindow(dpy))) {
     printf("  Xinerama is inactive.\n");
   } else {
     int i, count = 0; 
-    XineramaScreenInfo *xineramaScreens = XineramaQueryScreens(dpy, &count);
+    XRectangle *screens;
+
+    XineramaGetData(dpy, DefaultRootWindow(dpy), &screens, &count);
     
     for (i = 0; i < count; i++) {
-      XineramaScreenInfo *xs = &xineramaScreens[i];
-      printf("  head #%d: %dx%d @ %d,%d\n", xs->screen_number, 
-             xs->width, xs->height, xs->x_org, xs->y_org);
+      XRectangle *xs = &screens[i];
+      printf("  head #%d: %dx%d @ %d,%d\n", i, 
+             xs->width, xs->height, xs->x, xs->y);
     }
     
-    XFree(xineramaScreens);
+    XFree(screens);
   }
   
   return 1;
 }
 
-#endif /* PANORAMIX */
+#endif /* XINERAMA */
 
 
 /* utilities to manage the list of recognized extensions */
@@ -1048,7 +1050,7 @@
 #ifdef XRENDER
     {RENDER_NAME, print_xrender_info, False},
 #endif
-#ifdef PANORAMIX
+#ifdef XINERAMA
     {"XINERAMA", print_xinerama_info, False},
 #endif
     /* add new extensions here */





More information about the xorg-commit mailing list