a beginners question

Alexander Gottwald alexander.gottwald@s1999.tu-chemnitz.de
Fri Sep 19 12:14:00 GMT 2003


On Fri, 19 Sep 2003, amr roushi wrote:

> Alexander Gottwald wrote:
> > I've commited a patch which changes the title to "Cygwin/XFree86 - host"
> > if the "-query" option is supplied. Otherwise it stays "Cygwin/XFree86 - 0:0"
>
> Thank u Alex for the patch . How can we get it

There is currently no binary built with this patch. If you can't wait for the next 
release and want to compile XWin yourself you should check the contributor's guide 
at http://xfree86.cygwin.com/docs/cg/. 

But since this posting is titled "a beginners question" I think it is better for 
you to wait a few days for the next release.

I've nevertheless attached the patch for the curious. 

bye
	ago
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723
-------------- next part --------------
Index: InitOutput.c
===================================================================
RCS file: /cvsroot/xoncygwin/xc/programs/Xserver/hw/xwin/InitOutput.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InitOutput.c	15 Sep 2003 18:14:05 -0000	1.3
+++ InitOutput.c	18 Sep 2003 19:37:08 -0000	1.4
@@ -54,6 +54,7 @@
 HWND		g_hDlgExit = NULL;
 Bool		g_fCalledSetLocale = FALSE;
 Bool		g_fCalledXInitThreads = FALSE;
+const char *	g_pszQueryHost = NULL;
 
 
 /*
@@ -1189,6 +1190,16 @@
     {
       CHECK_ARGS (1);
       g_cmdline.rgbPath = argv[++i];
+      return 0; /* Let DIX parse this again */
+    }
+
+  /*
+   * Look for the '-query' argument
+   */
+  if (IS_OPTION ("-query"))
+    {
+      CHECK_ARGS (1);
+      g_pszQueryHost = argv[++i];
       return 0; /* Let DIX parse this again */
     }
 
Index: win.h
===================================================================
RCS file: /cvsroot/xoncygwin/xc/programs/Xserver/hw/xwin/win.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- win.h	17 Sep 2003 22:56:11 -0000	1.3
+++ win.h	18 Sep 2003 19:37:08 -0000	1.4
@@ -580,6 +580,7 @@
 extern HWND			g_hDlgExit;
 extern int                      g_copyROP[];
 extern int                      g_patternROP[];
+extern const char *             g_pszQueryHost;
 
 
 /*
Index: wincreatewnd.c
===================================================================
RCS file: /cvsroot/xoncygwin/xc/programs/Xserver/hw/xwin/wincreatewnd.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- wincreatewnd.c	15 Sep 2003 18:14:05 -0000	1.2
+++ wincreatewnd.c	18 Sep 2003 19:37:08 -0000	1.3
@@ -77,7 +77,13 @@
   RegisterClass (&wc);
 
   /* Set display and screen-specific tooltip text */
-  snprintf (szTitle,
+  if (g_pszQueryHost != NULL)
+    snprintf (szTitle,
+	    sizeof (szTitle),
+	    WINDOW_TITLE_XDMCP,
+	    g_pszQueryHost); 
+  else    
+    snprintf (szTitle,
 	    sizeof (szTitle),
 	    WINDOW_TITLE,
 	    display, 
@@ -277,7 +283,13 @@
 #endif
 
   /* Set display and screen-specific tooltip text */
-  snprintf (szTitle,
+  if (g_pszQueryHost != NULL)
+    snprintf (szTitle,
+	    sizeof (szTitle),
+	    WINDOW_TITLE_XDMCP,
+	    g_pszQueryHost); 
+  else    
+    snprintf (szTitle,
 	    sizeof (szTitle),
 	    WINDOW_TITLE,
 	    display, 
Index: winwindow.h
===================================================================
RCS file: /cvsroot/xoncygwin/xc/programs/Xserver/hw/xwin/winwindow.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- winwindow.h	15 Sep 2003 18:14:05 -0000	1.2
+++ winwindow.h	18 Sep 2003 19:37:08 -0000	1.3
@@ -43,6 +43,7 @@
 /* Constant strings */
 #define WINDOW_CLASS		"cygwin/xfree86"
 #define WINDOW_TITLE		"Cygwin/XFree86 - %s:%d"
+#define WINDOW_TITLE_XDMCP	"Cygwin/XFree86 - %s"
 #define WIN_SCR_PROP		"cyg_screen_prop rl"
 #define WINDOW_CLASS_X		"cygwin/xfree86 X rl"
 #define WINDOW_TITLE_X		"Cygwin/XFree86 X"


More information about the Cygwin-xfree mailing list