This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: ooh, ooh! more nitpicking
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: <cygwin-xfree at cygwin dot com>
- Date: Wed, 4 Jun 2003 20:48:51 +0200
- Subject: RE: ooh, ooh! more nitpicking
- Reply-to: cygwin-xfree at cygwin dot com
Hi,
perhaps this may be a startpoint for a feature like requested.
This patch, which is based on the Xwin-Test91 release, prepends a string '['
<display> '.' <screen>']' ( for example "[0.0]") to all related windows title.
This allow to distingush native application from x applications.
It should be easy to add some printing conditions like requested or to add an
Xwin command line switch to enable/disable this feature.
Cheers
Ralf
--------------------------------------------------------------------
$ diff -up winmultiwindowwm.c.orig winmultiwindowwm.c
--- winmultiwindowwm.c.orig 2003-06-04 20:02:49.000000000 +0200
+++ winmultiwindowwm.c 2003-06-04 20:42:22.000000000 +0200
@@ -40,6 +40,7 @@
#include <X11/X.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
+#include <X11/Xlibint.h>
#include <X11/Xlocale.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
@@ -412,8 +413,21 @@ GetWindowName (Display *pDisplay, Window
#if CYGMULTIWINDOW_DEBUG
ErrorF ("GetWindowName - Returning\n");
#endif
-}
+ /* prepend the display and screen number to the window title */
+ {
+ char buf[1024];
+ char *dsp = strstr(pDisplay->display_name,":");
+ if (dsp)
+ {
+ dsp++;
+ sprintf(buf,"[%s] %s",dsp,*ppName);
+ free(*ppName);
+ *ppName=strdup(buf);
+ }
+ }
+
+}
/*
* Send a message to the X server from the WM thread
--------------------------------------------------------------------
> So I love the fact that my X-forwarded apps now show up in the Alt-Tab
> list with their proper icons. Except that now there's no way to
> distinguish at a glance between, say, a Mozilla running locally and a
> Mozilla running remotely -- they have the same icon.
>
> How about this for overloading a simple feature and opening a gazillion
> cans of worms: the icon shown for each X application in the Alt-Tab list
> (as well as in the taskbar, for completeness sake), gets it's default
> icon but with an faint X11-style letter "X" in the background. This
> letter X should be visible no matter what my system colors are.
>
> As a bonus point, the number of the X display should be embedded next to
> the X to disambiguate between the same application being shown on
> different X servers, but this bonus functionality should only be enabled
> if more than one X server is actually running.
>
> Flames to /dev/null; granted, this is a silly idea but it does point out
> a problem. Additional information could be sought by seeing how other
> application-forwarding software (e.g., VNC, NetMeeting, PC Anywhere,
> Citrix Metaframe or their ilk) disambiguate under such circumstances, or
> if they bother to do anything at all.
>
> For those still reading, here's an entertaining note: the citrix.com
> site currently carries an ad which reads "Citrix embraces and extends
> Windows Server 2003".
>
> -JT
>
>
>