Fix the Xephyr host-cursor problem

Haitao Feng haitao.feng at intel.com
Thu May 13 22:03:55 PDT 2010


Signed-off-by: Haitao Feng <haitao.feng at intel.com>
---
 hw/kdrive/ephyr/Makefile.am    |   26 ++++++++++++++++++++------
 hw/kdrive/ephyr/ephyrhostglx.c |    5 ++++-
 hw/kdrive/ephyr/ephyrinit.c    |    8 +++++++-
 3 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am
index 3e3f1c7..4c28086 100644
--- a/hw/kdrive/ephyr/Makefile.am
+++ b/hw/kdrive/ephyr/Makefile.am
@@ -28,6 +28,25 @@ HOSTVIDEO_SRCS =		\
 	ephyrhostvideo.c	\
 	ephyrhostvideo.h
 
+if DRI2
+HOSTDRI_SRCS =                  \
+	ephyrdri2ext.c		\
+	ephyrdri2ext.h		\
+	ephyrdri2.c		\
+	ephyrdri2.h		\
+	dri2.c			\
+	dri2.h			\
+	ephyrdriext.c		\
+	ephyrdriext.h		\
+	ephyrdri.c		\
+	ephyrdri.h		\
+	XF86dri.c		\
+	xf86dri.h		\
+	ephyrglxext.c		\
+	ephyrglxext.h		\
+	ephyrhostglx.c		\
+	ephyrhostglx.h
+else
 HOSTDRI_SRCS =			\
 	ephyrdriext.c		\
 	ephyrdriext.h		\
@@ -35,16 +54,11 @@ HOSTDRI_SRCS =			\
 	ephyrdri.h		\
 	XF86dri.c		\
 	xf86dri.h		\
-	ephyrdri2ext.c		\
-	ephyrdri2ext.h		\
-	ephyrdri2.c		\
-	ephyrdri2.h		\
-	dri2.c			\
-	dri2.h			\
 	ephyrglxext.c		\
 	ephyrglxext.h		\
 	ephyrhostglx.c		\
 	ephyrhostglx.h
+endif
 
 XEPHYR_SRCS =			\
 	ephyr.c			\
diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c
index 6733782..6736b96 100644
--- a/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/hw/kdrive/ephyr/ephyrhostglx.c
@@ -165,11 +165,12 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
     xGLXGenericGetStringReq *req=NULL;
     xGLXSingleReply reply;
     int length=0, numbytes=0, major_opcode=0, get_string_op=0;
+#if DRI2
     const char *glx_texture_from_pixmap = "GLX_EXT_texture_from_pixmap ";
     char *start = NULL;
     char *end = NULL;
     int pos = 0, len = 0;
-
+#endif
     EPHYR_RETURN_VAL_IF_FAIL (dpy && a_string, FALSE) ;
 
     EPHYR_LOG ("enter\n") ;
@@ -234,6 +235,7 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
     UnlockDisplay (dpy);
     SyncHandle ();
 
+#if DRI2
     start = strstr(*a_string, glx_texture_from_pixmap);
     if (start){
         EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n",
@@ -245,6 +247,7 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
         EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n",
                    a_string_name, *a_string, numbytes) ;
     }
+#endif
 
     is_ok = TRUE ;
 out:
diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c
index 27cab3b..0021098 100644
--- a/hw/kdrive/ephyr/ephyrinit.c
+++ b/hw/kdrive/ephyr/ephyrinit.c
@@ -358,13 +358,19 @@ ephyrDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen)
   return TRUE;
 }
 
+static void
+ephyrDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen)
+{
+  return TRUE;
+}
+
 miPointerSpriteFuncRec EphyrPointerSpriteFuncs = {
 	ephyrRealizeCursor,
 	ephyrUnrealizeCursor,
 	ephyrSetCursor,
 	ephyrMoveCursor,
 	ephyrDeviceCursorInitialize,
-	NULL
+	ephyrDeviceCursorCleanup
 };
 
 
-- 
1.6.3.3



More information about the xorg-devel mailing list