Last change to non-XCB libX11 breaks KDE

Kean Johnston kean at armory.com
Wed Jul 18 09:15:13 PDT 2007


> Oops - I wasn't aware it would have this side-effect, nor apparently
> was the person who put in the previous fallback.
You're right. The patch I submitted yesterday was therefore
incomplete. here is a new patch, against the already-patched
source that you committed yesterday.

index 8da5140..1201980 100644
--- a/src/ConnDis.c
+++ b/src/ConnDis.c
@@ -150,9 +150,11 @@ _X11TransConnectDisplay (
      char* address = addrbuf;
      XtransConnInfo trans_conn = NULL;  /* transport connection object */
      int connect_stat;
+#if defined(LOCALCONN) || defined(TCPCONN)
+    Bool reset_hostname = False;       /* Reset hostname? */
+#endif
  #ifdef LOCALCONN
      struct utsname sys;
-    Bool reset_hostname = False;       /* Reset hostname? */
  # ifdef UNIXCONN
      Bool try_unix_socket = False;      /* Try unix if local fails */
  # endif
@@ -432,7 +434,11 @@ #endif
       *
       *     [host] : [:] dpy . scr \0
       */
-#ifdef LOCALCONN
+#if defined(LOCALCONN) || defined(TCPCONN)
+    /*
+     *  If we computed the host name, get rid of it so that
+     *  XDisplayString() and XDisplayName() agree.
+     */
      if (reset_hostname) {
         Xfree (phostname);
         phostname = NULL;
@@ -487,6 +493,7 @@ #if defined(TCPCONN)
         pprotocol = copystring("tcp", 3);
         phostname = tcphostname;
         tcphostname = NULL;
+       reset_hostname = True;
         goto connect;
      }
  #endif




More information about the xorg mailing list