[PATCH 10/19] Xephyr: some more hostx.c xcb-ification

Julien Cristau jcristau at debian.org
Wed Oct 20 10:11:52 PDT 2010


Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
Signed-off-by: Julien Cristau <jcristau at debian.org>
---
 hw/kdrive/ephyr/hostx.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index d6608ff..98a0a11 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -359,9 +359,9 @@ hostx_init (void)
   HostX.conn    = XGetXCBConnection(HostX.dpy);
   HostX.screen  = DefaultScreen(HostX.dpy);
   screen = xcb_aux_get_screen(HostX.conn, HostX.screen);
-  HostX.winroot = RootWindow(HostX.dpy, HostX.screen);
+  HostX.winroot = screen->root;
   HostX.gc      = xcb_generate_id(HostX.conn);
-  HostX.depth   = DefaultDepth(HostX.dpy, HostX.screen);
+  HostX.depth   = screen->root_depth;
   HostX.visual  = xcb_aux_find_visual_by_id(screen, screen->root_visual);
 
   xcb_create_gc(HostX.conn, HostX.gc, HostX.winroot, 0, NULL);
@@ -428,8 +428,8 @@ hostx_init (void)
 
           if (HostX.use_fullscreen)
             {
-              host_screen->win_width  = DisplayWidth(HostX.dpy, HostX.screen);
-              host_screen->win_height = DisplayHeight(HostX.dpy, HostX.screen);
+              host_screen->win_width  = screen->width_in_pixels;
+              host_screen->win_height = screen->height_in_pixels;
 
               hostx_set_fullscreen_hint();
             }
@@ -1153,7 +1153,7 @@ hostx_get_xcbconn(void)
 int
 hostx_get_screen(void)
 {
-    return DefaultScreen(HostX.dpy);
+    return HostX.screen;
 }
 
 int
@@ -1523,7 +1523,7 @@ hostx_has_glx (void)
     const xcb_query_extension_reply_t *glx;
 
     glx = xcb_get_extension_data(HostX.conn, &xcb_glx_id);
-    
+
     return glx && glx->present;
 }
 
-- 
1.7.1



More information about the xorg-devel mailing list