Make mutter work

Haitao Feng haitao.feng at intel.com
Mon May 10 23:32:32 PDT 2010


Signed-off-by: Haitao Feng <haitao.feng at intel.com>
---
 hw/kdrive/ephyr/ephyrhostglx.c |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyrhostglx.c b/hw/kdrive/ephyr/ephyrhostglx.c
index 728687b..6733782 100644
--- a/hw/kdrive/ephyr/ephyrhostglx.c
+++ b/hw/kdrive/ephyr/ephyrhostglx.c
@@ -165,6 +165,10 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
     xGLXGenericGetStringReq *req=NULL;
     xGLXSingleReply reply;
     int length=0, numbytes=0, major_opcode=0, get_string_op=0;
+    const char *glx_texture_from_pixmap = "GLX_EXT_texture_from_pixmap ";
+    char *start = NULL;
+    char *end = NULL;
+    int pos = 0, len = 0;
 
     EPHYR_RETURN_VAL_IF_FAIL (dpy && a_string, FALSE) ;
 
@@ -229,8 +233,18 @@ ephyrHostGLXGetStringFromServer (int a_screen_number,
     _XEatData (dpy, length) ;
     UnlockDisplay (dpy);
     SyncHandle ();
-    EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n",
-               a_string_name, *a_string, numbytes) ;
+
+    start = strstr(*a_string, glx_texture_from_pixmap);
+    if (start){
+        EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n",
+                   a_string_name, *a_string, numbytes) ;
+        len = strlen(glx_texture_from_pixmap);
+        pos = start - *a_string;
+        end = start + strlen(glx_texture_from_pixmap);
+        memmove(start, end, numbytes + 1 - pos - len);
+        EPHYR_LOG ("strname:%#x, strvalue:'%s', strlen:%d\n",
+                   a_string_name, *a_string, numbytes) ;
+    }
 
     is_ok = TRUE ;
 out:
-- 
1.6.3.3



More information about the xorg-devel mailing list