[PATCH 3/3] Add virtual root window ID.

Corbin Simpson mostawesomedude at gmail.com
Fri Mar 26 16:18:20 PDT 2010


From: Eugene St Leger <grimrc at yahoo.com>

Part of #7968.

Useful for e.g. SDL targeted rendering.

Signed-off-by: Corbin Simpson <MostAwesomeDude at gmail.com>
---
 xdpyinfo.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/xdpyinfo.c b/xdpyinfo.c
index 2251085..ef6829b 100644
--- a/xdpyinfo.c
+++ b/xdpyinfo.c
@@ -147,6 +147,8 @@ in this Software without prior written authorization from The Open Group.
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "vroot.h"
+
 /* Turn a NULL pointer string into an empty string */
 #define NULLSTR(x) (((x)!=NULL)?(x):(""))
 
@@ -523,7 +525,9 @@ print_screen_info(Display *dpy, int scr)
     }
     putchar ('\n');
     if (depths) XFree ((char *) depths);
-    printf ("  root window id:    0x%lx\n", RootWindow (dpy, scr));
+    printf ("  root window id:         0x%lx\n", RootWindow (dpy, scr));
+    printf ("  virtual root window id: 0x%lx\n",
+        VirtualRootWindowOfScreen (ScreenOfDisplay (dpy, scr)));
     printf ("  depth of root window:    %d plane%s\n",
 	    DisplayPlanes (dpy, scr),
 	    DisplayPlanes (dpy, scr) == 1 ? "" : "s");
-- 
1.6.6.1



More information about the xorg-devel mailing list