Added some debugging stuff to prove that the title-setting issue is NOT an

Eterm bug.


SVN revision: 1293
This commit is contained in:
Michael Jennings 1999-11-13 03:51:58 +00:00
parent 1b2977a3d4
commit 25345b9511
3 changed files with 36 additions and 13 deletions

View File

@ -1,4 +1,4 @@
config.log *.log
config.sub config.sub
config.cache config.cache
config.guess config.guess
@ -18,3 +18,4 @@ config.h.in
missing missing
mkinstalldirs mkinstalldirs
install-sh install-sh
Eterm*.tar.gz

View File

@ -1519,7 +1519,6 @@ set_colorfgbg(void)
} }
#endif /* NO_BRIGHTCOLOR */ #endif /* NO_BRIGHTCOLOR */
/* xterm sequences - title, iconName, color (exptl) */
#ifdef SMART_WINDOW_TITLE #ifdef SMART_WINDOW_TITLE
static void static void
set_title(const char *str) set_title(const char *str)
@ -1527,15 +1526,28 @@ set_title(const char *str)
char *name; char *name;
if (!str) str = APL_NAME "-" VERSION;
if (XFetchName(Xdisplay, TermWin.parent, &name) == 0) { if (XFetchName(Xdisplay, TermWin.parent, &name) == 0) {
D_X11(("set_title(): XFetchName() failed.\n"));
name = NULL; name = NULL;
} }
if (name == NULL || strcmp(name, str)) { if (name == NULL || strcmp(name, str)) {
D_X11(("set_title(): Setting window title to \"%s\"\n", str));
XStoreName(Xdisplay, TermWin.parent, str); XStoreName(Xdisplay, TermWin.parent, str);
#if DEBUG >= DEBUG_X11
if (debug_level >= DEBUG_X11) {
if (name) XFree(name);
if (XFetchName(Xdisplay, TermWin.parent, &name) == 0) {
print_error("set_title(): Unable to set the window title to \"%s\"! What the heck is going on?!\n");
} else if (!name || strcmp(name, str)) {
print_error("set_title(): Window title still says \"%s\" after being set to \"%s\". I am a confused Eterm. :(\n", NONULL(name), str);
} else {
D_X11(("set_title(): Succeeded.\n"));
} }
if (name) {
XFree(name);
} }
#endif
}
if (name) XFree(name);
} }
static void static void
@ -1544,19 +1556,29 @@ set_icon_name(const char *str)
char *name; char *name;
if (!str) str = APL_NAME "-" VERSION;
if (XGetIconName(Xdisplay, TermWin.parent, &name) == 0) { if (XGetIconName(Xdisplay, TermWin.parent, &name) == 0) {
D_X11(("set_icon_name(): XGetIconName() failed.\n"));
name = NULL; name = NULL;
} }
if (name == NULL || strcmp(name, str)) { if (name == NULL || strcmp(name, str)) {
D_X11(("set_icon_name(): Setting window icon name to \"%s\"\n", str));
XSetIconName(Xdisplay, TermWin.parent, str); XSetIconName(Xdisplay, TermWin.parent, str);
#if DEBUG >= DEBUG_X11
if (debug_level >= DEBUG_X11) {
if (name) XFree(name);
if (XGetIconName(Xdisplay, TermWin.parent, &name) == 0) {
print_error("set_icon_name(): Unable to set the window icon name to \"%s\"! What the heck is going on?!\n");
} else if (!name || strcmp(name, str)) {
print_error("set_icon_name(): Window icon name still says \"%s\" after being set to \"%s\". I am a confused Eterm. :(\n", NONULL(name), str);
} else {
D_X11(("set_icon_name(): Succeeded.\n"));
} }
if (name) {
XFree(name);
} }
#endif
}
if (name) XFree(name);
} }
#else
# define set_title(str) XStoreName(Xdisplay, TermWin.parent, str)
# define set_icon_name(str) XSetIconName(Xdisplay, TermWin.parent, str)
#endif #endif
/* /*

View File

@ -149,8 +149,8 @@ enum color_list {
}} while (0) }} while (0)
#ifndef SMART_WINDOW_TITLE #ifndef SMART_WINDOW_TITLE
# define set_title(str) XStoreName(Xdisplay, TermWin.parent, str) # define set_title(str) XStoreName(Xdisplay, TermWin.parent, ((str) ? (str) : (APL_NAME "-" VERSION)))
# define set_icon_name(str) XSetIconName(Xdisplay, TermWin.parent, str) # define set_icon_name(str) XSetIconName(Xdisplay, TermWin.parent, ((str) ? (str) : (APL_NAME "-" VERSION)))
#endif #endif
/************ Variables ************/ /************ Variables ************/