[PATCH 16/19] Xephyr: drop remaining Xlib dependency
Julien Cristau
jcristau at debian.org
Wed Oct 20 10:11:58 PDT 2010
Reviewed-by: Mikhail Gusarov <dottedmag at dottedmag.net>
Signed-off-by: Julien Cristau <jcristau at debian.org>
---
configure.ac | 4 ++--
hw/kdrive/ephyr/hostx.c | 19 ++++++-------------
hw/kdrive/ephyr/hostx.h | 3 ---
3 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2a0c80a..97234ac 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2061,12 +2061,12 @@ if test "$KDRIVE" = yes; then
AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver])
fi
- XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp xcb x11-xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
+ XEPHYR_REQUIRED_LIBS="xau xdmcp xcb xcb-shape xcb-aux xcb-image xcb-icccm xcb-shm xcb-keysyms"
if test "x$XV" = xyes; then
XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xcb-xv"
fi
if test "x$DRI" = xyes && test "x$GLX" = xyes; then
- XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS $LIBGL libdrm xcb-glx xcb-xf86dri > 1.6"
+ XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS libdrm xcb-glx xcb-xf86dri > 1.6"
fi
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])
diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c
index f6f7b9a..d054a40 100644
--- a/hw/kdrive/ephyr/hostx.c
+++ b/hw/kdrive/ephyr/hostx.c
@@ -51,12 +51,10 @@
#include <sys/shm.h>
#include <sys/time.h>
-#include <X11/Xlib.h>
-#include <X11/Xutil.h>
+#include <X11/Xdefs.h>
#include <X11/keysym.h>
#include <xcb/xcb.h>
#include <xcb/xproto.h>
-#include <X11/Xlib-xcb.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xcb_aux.h>
#include <xcb/shm.h>
@@ -69,6 +67,10 @@
#endif /* XF86DRI */
#include "ephyrlog.h"
+#ifndef True
+#define True 1
+#define False 0
+#endif
/*
* All xlib calls go here, which gets built as its own .a .
@@ -94,7 +96,6 @@ struct EphyrHostScreen
struct EphyrHostXVars
{
char *server_dpy_name;
- Display *dpy;
xcb_connection_t *conn;
int screen;
xcb_visualtype_t *visual;
@@ -350,14 +351,12 @@ hostx_init (void)
EPHYR_DBG("mark");
- if ((HostX.dpy = XOpenDisplay(getenv("DISPLAY"))) == NULL)
+ if ((HostX.conn = xcb_connect(NULL, &HostX.screen)) == NULL)
{
fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n");
exit(1);
}
- HostX.conn = XGetXCBConnection(HostX.dpy);
- HostX.screen = DefaultScreen(HostX.dpy);
screen = xcb_aux_get_screen(HostX.conn, HostX.screen);
HostX.winroot = screen->root;
HostX.gc = xcb_generate_id(HostX.conn);
@@ -1155,12 +1154,6 @@ hostx_get_event(EphyrHostXEvent *ev)
return 0;
}
-void*
-hostx_get_display(void)
-{
- return HostX.dpy ;
-}
-
xcb_connection_t *
hostx_get_xcbconn(void)
{
diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h
index 8694f9a..22a639f 100644
--- a/hw/kdrive/ephyr/hostx.h
+++ b/hw/kdrive/ephyr/hostx.h
@@ -211,9 +211,6 @@ hostx_load_keymap (void);
int
hostx_get_event (EphyrHostXEvent *ev);
-void*
-hostx_get_display (void) ;
-
xcb_connection_t *
hostx_get_xcbconn(void);
--
1.7.1
More information about the xorg-devel
mailing list