xterm non icccm compliant?
Russell Shaw
rjshaw at netspace.net.au
Sat Feb 18 05:50:19 PST 2006
Hi,
In my window-manager program, i start xterm with a fork.
Xterm generates a MapRequest on the root window. Reading the WM_NAME
property on the xterm window sets title="xterm", which is its arg[0]:
static void
handle_map_request(App *app, XEvent *xev, void *data)
{
XMapRequestEvent *ev = &xev->xmaprequest;
XFlush(app->display);
XSync(app->display, 0)
XTextProperty prop;
XGetWMName(app->display, ev->window, &prop);
char **list;
int count;
Xutf8TextPropertyToTextList(app->display, &prop, &list, &count);
char *title = strdup(list[0]);
}
If i put in a time delay, title is set to "/home/russell":
static void
handle_map_request(App *app, XEvent *xev, void *data)
{
XMapRequestEvent *ev = &xev->xmaprequest;
XFlush(app->display);
XSync(app->display, 0);
sleep(1);
XTextProperty prop;
XGetWMName(app->display, ev->window, &prop);
char **list;
int count;
Xutf8TextPropertyToTextList(app->display, &prop, &list, &count);
char *title = strdup(list[0]);
}
According to the ICCCM, xterm should set WM_NAME *before* mapping the window.
I'm using: xterm -version
XTerm(202)
with:
X Window System Version 6.8.2 (Debian 6.8.2.dfsg.1-7 20050908031534 David Nusinow <dnusinow at debian.org>)
Release Date: 9 February 2005
X Protocol Version 11, Revision 0, Release 6.8.2
Build Operating System: Linux 2.6.12-1-686 i686 [ELF]
Current Operating System: Linux main 2.6.11.5-190605 #1 Sun Jun 19 19:55:14 EST 2005 i686
Build Date: 08 September 2005
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
OS Kernel: Linux version 2.6.11.5-190605 (russell at radion.com.au) (gcc version 3.4.4 20050314
(prerelease) (Debian 3.4.3-12.1)) #1 Sun Jun 19 19:55:14 EST 2005 TF
More information about the xorg
mailing list