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"