7004003 snv_153 breaks remote display (xhosting) of applications nv_155
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 02 Dec 2010 22:21:09 -0800
changeset 1047 cebfb122be5a
parent 1046 ecba5d6aaf2e
child 1048 fee87aaa12e8
7004003 snv_153 breaks remote display (xhosting) of applications
open-src/lib/libX11/6667057.patch
open-src/lib/libX11/mapfile-vers
open-src/lib/libX11/sun-src/src/XInteractive.c
--- a/open-src/lib/libX11/6667057.patch	Wed Nov 24 18:14:04 2010 -0800
+++ b/open-src/lib/libX11/6667057.patch	Thu Dec 02 22:21:09 2010 -0800
@@ -1,6 +1,6 @@
---- src/OpenDis.c	2010-10-12 08:09:31.324390000 -0700
-+++ src/OpenDis.c	2010-10-13 12:17:28.320665000 -0700
-@@ -39,6 +39,13 @@
+--- src/OpenDis.c	2010-12-01 22:37:45.756982154 -0800
++++ src/OpenDis.c	2010-12-01 22:37:46.942754311 -0800
+@@ -39,6 +39,13 @@ in this Software without prior written a
  #include <X11/Xatom.h>
  #include <X11/Xresource.h>
  #include <stdio.h>
@@ -14,34 +14,7 @@
  #include "Xintconn.h"
  
  #ifdef XKB
-@@ -815,6 +822,18 @@
- #endif
- /* begin SUNSOFT_INTERACTIVE */
- 	{
-+#if USE_XCB
-+	   uint32_t pid = (uint32_t) getpid();
-+
-+	   if ((XCBSolarisIAQueryExtension(dpy->xcb->connection)) == True) {
-+	       (void) XCBSolarisIASetProcessInfo(dpy->xcb->connection,
-+		       (unsigned char *) &pid, INTERACTIVE_INFO, 1);
-+	   }
-+#ifdef SUNSOFT
-+	   dpy->smeBuffer = NULL;
-+	   dpy->smeSize = 0;
-+#endif
-+#else
- 
- 	   long  pid    = (long) getpid();
- 	   int majorop, first_event, first_error;
-@@ -825,6 +844,7 @@
- 		  XSolarisIASetProcessInfo(dpy, (unsigned char *)&pid,
- 					   INTERACTIVE_INFO, 1);
- 	   }
-+#endif /* USE_XCB */
- 	}
- /* end SUNSOFT_INTERACTIVE */
- 
-@@ -841,10 +861,12 @@
+@@ -841,9 +848,11 @@ fallback_success:
       */
          _conn_buf_size = conn_buf_size;
  
@@ -49,14 +22,14 @@
          if (sme_conn)
             InitializeSmeConn(dpy, idisplay);
          else
++#endif /* USE_XCB */
             dpy->smeBuffer = NULL ;
-+#endif /* USE_XCB */
  
  #endif /* SME */
- 
---- src/Makefile.am	2010-10-12 08:09:30.817810000 -0700
-+++ src/Makefile.am	2010-10-13 12:18:30.723983000 -0700
-@@ -3,7 +3,7 @@
+
+--- src/Makefile.am	2010-12-01 22:37:45.741732419 -0800
++++ src/Makefile.am	2010-12-01 22:37:46.942993564 -0800
+@@ -3,7 +3,7 @@ XKB_SUBDIRS = xkb
  endif
  SUBDIRS = util xcms xlibi18n $(XKB_SUBDIRS)
  
@@ -65,7 +38,7 @@
  
  BUILT_SOURCES=ks_tables.h
  CLEANFILES=ks_tables.h ks_tables_h
-@@ -353,7 +353,6 @@
+@@ -353,7 +353,6 @@ libX11_la_SOURCES += \
                    xcb_io.c \
                    Xxcbint.h
  
--- a/open-src/lib/libX11/mapfile-vers	Wed Nov 24 18:14:04 2010 -0800
+++ b/open-src/lib/libX11/mapfile-vers	Thu Dec 02 22:21:09 2010 -0800
@@ -795,10 +795,6 @@
 	XSolarisIAQueryExtension;
 	XSolarisIAQueryVersion;
 	XSolarisIASetProcessInfo;
-	XCBSolarisIAGetProcessInfo;
-	XCBSolarisIAQueryExtension;
-	XCBSolarisIAQueryVersion;
-	XCBSolarisIASetProcessInfo;
 	XUnlockDisplay;
 	XcmsCIELabClipL;
 	XcmsCIELabClipLab;
--- a/open-src/lib/libX11/sun-src/src/XInteractive.c	Wed Nov 24 18:14:04 2010 -0800
+++ b/open-src/lib/libX11/sun-src/src/XInteractive.c	Thu Dec 02 22:21:09 2010 -0800
@@ -306,114 +306,3 @@
     SyncHandle();
     return True;
 }
-
-#if USE_XCB
-
-Bool
-XCBSolarisIAQueryExtension(xcb_connection_t* conn)
-{
-    xcb_xia_query_extension_reply_t* re;
-    xcb_xia_query_extension_cookie_t ce;
-    xcb_generic_error_t* error;
-
-    (void) memset(&ce, '\0', sizeof(ce));
-
-    ce = xcb_xia_query_extension(conn);
-    re = xcb_xia_query_extension_reply(conn, ce, &error);
-
-    if (re && !error)
-        return True;
-
-    return False;
-}
-
-
-Bool
-XCBSolarisIAQueryVersion(xcb_connection_t* conn,
-        int* majorVersion,
-        int* minorVersion)
-{
-    xcb_xia_query_version_reply_t* rv;
-    xcb_xia_query_version_cookie_t cv;
-    xcb_generic_error_t* error;
-
-    (void) memset(&cv, '\0', sizeof(cv));
-
-    cv = xcb_xia_query_version(conn);
-    rv = xcb_xia_query_version_reply(conn, cv, &error);
-
-    if (rv && !error) {
-        *majorVersion = rv->major;
-        *minorVersion = rv->minor;
-        return True;
-    }
-
-    *majorVersion = 0;
-    *minorVersion = 0;
-    return False;
-}
-
-
-Bool
-XCBSolarisIAGetProcessInfo(xcb_connection_t* conn,
-        unsigned char** Pinfo,
-        CARD32 flags,
-        int* count)
-{
-    xcb_xia_get_process_info_cookie_t pc;
-    xcb_generic_iterator_t itr;
-    xcb_xia_get_process_info_reply_t* pr;
-    xcb_generic_error_t* error;
-    uint32_t* pinfo;
-
-    if ((conn == NULL) || (count == NULL) || (Pinfo == NULL))
-        return False;
-
-    *Pinfo = NULL;
-    *count = 0;
-    (void) memset(&pc, '\0', sizeof(pc));
-
-    pc = xcb_xia_get_process_info(conn, flags);
-    pr = xcb_xia_get_process_info_reply(conn, pc, &error);
-
-    if (pr && !error && (pr->count > 0)) {
-	uint32_t* pid = xcb_xia_get_process_info_pinfo(pr);
-	if (pid == NULL)
-	    return False;
-
-        pinfo = (uint32_t*) Xmalloc((size_t) (pr->count * sizeof(uint32_t)));
-        if (pinfo == NULL)
-            return False;
-
-	*count = pr->count;
-        (void) memcpy(pinfo, pid, (size_t) (*count * sizeof(uint32_t)));
-        *Pinfo = (unsigned char *) pinfo;
-        return True;
-    }
-
-    return False;
-}
-
-
-Bool
-XCBSolarisIASetProcessInfo(xcb_connection_t* conn,
-        unsigned char* Pinfo,
-        CARD32 flags,
-        CARD32 count)
-{
-    xcb_void_cookie_t pc;
-
-    if (count == 0)
-        return True;
-
-    if ((conn == NULL) || (Pinfo == NULL))
-        return False;
-
-    pc = xcb_xia_set_process_info(conn, flags,
-            (uint32_t) getuid(), count, (uint32_t *) Pinfo);
-
-    return True;
-}
-
-#endif /* USE_XCB */
-