summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2010-06-24 23:35:15 +0100
committerJulien Cristau <jcristau@debian.org>2010-07-16 20:48:45 +0100
commit3355cf58516d294f57b8a5b789bfa2a89e263d7b (patch)
tree6a6bf155d9fb9b9d545f8b6987ea2b042e44de1c
parent0f687600506f7b13cffadf27cbe5820cfae653d0 (diff)
Xephyr: move HostX.visual to xcb
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r--hw/kdrive/ephyr/hostx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index 1491f53ca..d6608ff4a 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 ?*/
}