I have an ncurses based application that changes the xterm title to the
current working directory. I was using printf statements and escape
characters to change the title but if the program is running inside of
the screen program that will not work. I changed the program to use Xlib
calls but I am not sure if I am doing it correctly or not.
This works but I am wondering if there is a better way.
change_term_title(char * new_title)
Display *dsp = NULL;
Window win = 0;
XStringListToTextProperty(&new_title, 1, &prop);
dsp = XOpenDisplay(NULL);
win = atol(getenv("WINDOWID");
XSetWMName(dsp, win, &prop);
I have never done any Xlib programming and I don't know how portable thisQuote:}
code is. I realize that the code needs some error checking, but I am
wondering if I am on the right track or if there is a better way of doing
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----