summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/list.c12
1 files changed, 9 insertions, 3 deletions
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;