If ELinks is compiled with X support, then on X, it can grab the
terminal title when it starts and restore that title when it exits.
Otherwise, ELinks is hardcoded to set the value of $TERM.
ELinks needs to be compiled with the X libraries in order to be able
to grab the terminal title. Did you have the libx11-devel package
installed when you compiled ELinks?
---
I tried rebuilding Elinks with --with-x. This didnt actually do anything, so
I manually defined HAVE_X11 in config.h and had to add
#define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
#define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
above the
#include <X11/Xlib.h>
line in src/osdep/osdep.c. Still the behaviour did not change. I ran elinks
under the debugger and as it turns out, get_window_title() returns an empty
string which it gets from XGetWMName. On exit from Elinks, free_itrm() is
called and due to itrm->orig_title being empty, it defaults to using $TERM.
So essentially, the behaviour is unchanged after compiling with X. Running
xprop on the terminal shows the window name is indeed "Terminal", so the
next thing I tried was to change the next line in get_window_title():
- while (!x_error && (!status || !text_prop.value)) {
+ while (!x_error && (!status || !text_prop.value || !*text_prop.value)) {
and this actually works. I hope someone will verify this is correct and patch
the codebase. Thanks for the help.
saurabh
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
https://signup.live.com/signup.aspx?id=60969
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users