summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-09-18 09:39:57 +0000
committersabetts <sabetts>2001-09-18 09:39:57 +0000
commitb953c9d532846ce07cbe1d065c9c30cf40d8903b (patch)
tree80ddcdd4aa32092c767571be36d7179053584c7e
parent4bb832c2d2a691c1b96deee822de9d0767b827cc (diff)
downloadratpoison-b953c9d532846ce07cbe1d065c9c30cf40d8903b.zip
(window_name): make sure the default window name is
not NULL. In this case return win's user_name field which is never NULL.
-rw-r--r--ChangeLog6
-rw-r--r--src/list.c12
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index aee8c18..2040123 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-18 shawn <sabetts@vcn.bc.ca>
+
+ * src/list.c (window_name): make sure the default window name is
+ not NULL. In this case return win's user_name field which is never
+ NULL.
+
2001-09-18 shawn <sabetts@diggin.lamenet.tmp>
* src/actions.c(user_commands)[0]: remove "lastmsg" from the list.
diff --git a/src/list.c b/src/list.c
index d6d2bca..dbd5ea6 100644
--- a/src/list.c
+++ b/src/list.c
@@ -77,13 +77,19 @@ window_name (rp_window *win)
switch (defaults.win_name)
{
case 0:
- return win->wm_name;
+ if (win->wm_name)
+ return win->wm_name;
+ else return win->user_name;
case 1:
- return win->res_name;
+ if (win->res_name)
+ return win->res_name;
+ else return win->user_name;
case 2:
- return win->res_class;
+ if (win->res_class)
+ return win->res_class;
+ else return win->user_name;
default:
return win->wm_name;