summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
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;
}