[Vm-dev] X11 window title setting prim
tim Rowledge
tim at rowledge.org
Thu Nov 27 22:58:07 UTC 2014
There’s a sensible looking prim in the Cog vm code to change the window title. The prim calls sqUnixMain.c>>ioSetWindowLabelOfSize() which in turns ends up at sqUnixX11.c>>display_hostWindowSetTitle().
static int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle)
{
if (windowIndex != 1 && windowIndex != stWindow)
return -1;
XChangeProperty(stDisplay, stParent,
XInternAtom(stDisplay, "_NET_WM_NAME", False),
XInternAtom(stDisplay, "UTF8_STRING", False),
8, PropModeReplace, newTitle, sizeOfTitle);
return 0;
}
Doesn’t work, at least not on my Pi. Running though GDB it fails because windowIndex is neither 1 nor stWindow. What is *is* is stParent, because that is what display_ioGetWindowHandle() says it is. I dunno - stParent, stWindow? Which should it be? X11 stuff is encrypted ancient greek to me.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Nice computers don't go down.
More information about the Vm-dev
mailing list