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@rowledge.org; http://www.rowledge.org/tim Nice computers don't go down.
On 27-11-2014, at 2:58 PM, tim Rowledge tim@rowledge.org wrote:
There’s a sensible looking prim in the Cog vm code to change the window title.
[snip]
I dunno - stParent, stWindow? Which should it be? X11 stuff is encrypted ancient greek to me.
Changing it to stParent makes it ‘work’ in the sense that I can now change the title of the main window but surly the parameter for the XChangeProperty call ought to be windowIndex and there ought to be some form of checking for more than just the main window? After all this is supposed to cope with multiple host windows.
I’ll check in this change so that it at least does the basic job but it will need improving.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim taffeta - Welsh goats cheese
vm-dev@lists.squeakfoundation.org