[PATCH 09/19] Xephyr: move HostX.visual to xcb

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


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

diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 1491f53..d6608ff 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -97,7 +97,7 @@ struct EphyrHostXVars
   Display        *dpy;
   xcb_connection_t *conn;
   int             screen;
-  Visual         *visual;
+  xcb_visualtype_t *visual;
   Window          winroot;
   xcb_gcontext_t  gc;
   int             depth;
@@ -362,7 +362,7 @@ hostx_init (void)
   HostX.winroot = RootWindow(HostX.dpy, HostX.screen);
   HostX.gc      = xcb_generate_id(HostX.conn);
   HostX.depth   = DefaultDepth(HostX.dpy, HostX.screen);
-  HostX.visual  = DefaultVisual(HostX.dpy, HostX.screen);
+  HostX.visual  = xcb_aux_find_visual_by_id(screen, screen->root_visual);
 
   xcb_create_gc(HostX.conn, HostX.gc, HostX.winroot, 0, NULL);
   cookie_WINDOW_STATE = xcb_intern_atom(HostX.conn, False, strlen("_NET_WM_STATE"), "_NET_WM_STATE");
@@ -588,7 +588,7 @@ hostx_get_bpp (EphyrScreenInfo screen)
     return 0;
 
   if (host_depth_matches_server (host_screen))
-    return HostX.visual->bits_per_rgb;
+    return HostX.visual->bits_per_rgb_value;
   else
     return host_screen->server_depth; /*XXX correct ?*/
 }
-- 
1.7.1



More information about the xorg-devel mailing list