summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2000-12-01 08:36:57 +0000
committersabetts <sabetts>2000-12-01 08:36:57 +0000
commit5ec1978cf5d9917e1ea6dda6f9169aedef7351a0 (patch)
treebaf9e175d8e90f10bd1799f9850a3bc5071bdc8a /src/list.c
parentb21c78a5b79f2548aa1a4cd24a3f4717aa9051ca (diff)
downloadratpoison-5ec1978cf5d9917e1ea6dda6f9169aedef7351a0.zip
p out unmapped windows in find_window_by_name
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/list.c b/src/list.c
index c4737ce..fa06f69 100644
--- a/src/list.c
+++ b/src/list.c
@@ -119,7 +119,7 @@ find_window_by_number (int n)
for (cur=rp_window_head; cur; cur=cur->next)
{
- if (cur->state != STATE_MAPPED) continue;
+ if (cur->state == STATE_UNMAPPED) continue;
if (n == cur->number) return cur;
}
@@ -146,6 +146,8 @@ find_window_by_name (char *name)
for (cur=rp_window_head; cur; cur=cur->next)
{
+ if (cur->state == STATE_UNMAPPED) continue;
+
if (str_comp (name, cur->name, strlen (name))) return cur;
}