From 8d82d806ee38d45ec7cdbf8b1f671ec1e4437567 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Sun, 2 Nov 2008 20:46:38 +0000 Subject: Xming: Correct the way display and screen number is reported in window titles and tooltips Correct the tooltip text for the toolbar X icon to be strictly correct, 'display-number:screen' should be ':display-number.screen'. Also for the default window title. Adjust the style of the Windows title in XDMCP mode from 'Xming - hostname' to 'hostname:display-number.screen'. Copyright (C) Colin Harrison 2005-2008 http://www.straightrunning.com/XmingNotes/ http://sourceforge.net/projects/xming/ Signed-off-by: Jon TURNEY --- hw/xwin/wincreatewnd.c | 8 ++++++-- hw/xwin/wintrayicon.c | 2 +- hw/xwin/winwindow.h | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c index 796a08593..85b6cf8a9 100644 --- a/hw/xwin/wincreatewnd.c +++ b/hw/xwin/wincreatewnd.c @@ -88,7 +88,9 @@ winCreateBoundingWindowFullScreen (ScreenPtr pScreen) snprintf (szTitle, sizeof (szTitle), WINDOW_TITLE_XDMCP, - g_pszQueryHost); + g_pszQueryHost, + display, + (int) pScreenInfo->dwScreen); else snprintf (szTitle, sizeof (szTitle), @@ -331,7 +333,9 @@ winCreateBoundingWindowWindowed (ScreenPtr pScreen) snprintf (szTitle, sizeof (szTitle), WINDOW_TITLE_XDMCP, - g_pszQueryHost); + g_pszQueryHost, + display, + (int) pScreenInfo->dwScreen); else snprintf (szTitle, sizeof (szTitle), diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c index 054a8e956..d1a7b4d82 100755 --- a/hw/xwin/wintrayicon.c +++ b/hw/xwin/wintrayicon.c @@ -59,7 +59,7 @@ winInitNotifyIcon (winPrivScreenPtr pScreenPriv) /* Set display and screen-specific tooltip text */ snprintf (nid.szTip, sizeof (nid.szTip), - PROJECT_NAME " Server - %s:%d", + PROJECT_NAME " Server:%s.%d", display, (int) pScreenInfo->dwScreen); diff --git a/hw/xwin/winwindow.h b/hw/xwin/winwindow.h index 9c49d6482..38db55f5c 100644 --- a/hw/xwin/winwindow.h +++ b/hw/xwin/winwindow.h @@ -42,8 +42,8 @@ # define PROJECT_NAME "Cygwin/X" #endif #define WINDOW_CLASS "cygwin/x" -#define WINDOW_TITLE PROJECT_NAME " - %s:%d" -#define WINDOW_TITLE_XDMCP PROJECT_NAME " - %s" +#define WINDOW_TITLE PROJECT_NAME ":%s.%d" +#define WINDOW_TITLE_XDMCP "%s:%s.%d" #define WIN_SCR_PROP "cyg_screen_prop rl" #define WINDOW_CLASS_X "cygwin/x X rl" #define WINDOW_TITLE_X PROJECT_NAME " X" -- cgit v1.2.3