From 148f4aba010a37a27eb7b0eb12d5c09f02e1c8b1 Mon Sep 17 00:00:00 2001 From: garbeam Date: Sat, 19 Nov 2005 20:26:17 +0200 Subject: [PATCH] fixed some issues --- cmd/wm/client.c | 6 +++--- cmd/wm/core.c | 5 +++-- cmd/wm/wm.c | 1 - 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/wm/client.c b/cmd/wm/client.c index 6143e059..23d953f7 100644 --- a/cmd/wm/client.c +++ b/cmd/wm/client.c @@ -250,7 +250,7 @@ draw_client(Client * c) && f->clients[f->sel] == c); } else draw_tab(f, c->files[C_NAME]->content, i * tw, 0, tw, tabh, - is_selected(f) && f->clients[f->sel] == c); + ISSELFRAME(f) && f->clients[f->sel] == c); } void @@ -269,12 +269,12 @@ draw_clients(Frame * f) if (!f->clients[i + 1]) { int xoff = i * tw; draw_tab(f, f->clients[i]->files[C_NAME]->content, - xoff, 0, frect->width - xoff, tabh, is_selected(f) + xoff, 0, frect->width - xoff, tabh, ISSELFRAME(f) && f->clients[f->sel] == f->clients[i]); break; } else draw_tab(f, f->clients[i]->files[C_NAME]->content, - i * tw, 0, tw, tabh, is_selected(f) + i * tw, 0, tw, tabh, ISSELFRAME(f) && f->clients[f->sel] == f->clients[i]); } XSync(dpy, False); diff --git a/cmd/wm/core.c b/cmd/wm/core.c index 38c206bb..4a9d940e 100644 --- a/cmd/wm/core.c +++ b/cmd/wm/core.c @@ -396,8 +396,9 @@ icons(void *obj, char *cmd) static void _close_client(void *obj, char *cmd) { - if (clients && clients[sel_client]) - close_client(clients[sel_client]); + Frame *f = pages ? SELFRAME(pages[sel]) : 0; + if (f->clients[f->sel]) + close_client(f->clients[f->sel]); } static void diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c index 2d27d0f6..ae820587 100644 --- a/cmd/wm/wm.c +++ b/cmd/wm/wm.c @@ -207,7 +207,6 @@ run() pages = 0; layouts = 0; sel = 0; - sel_client = 0; init_atoms(); init_cursors();