commit abe42ae2d0fbca5ba6a6c01b6d58c5970a03a3bd
parent e083924cdfcb58d91b410ff93587ab8eba901a8a
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Tue, 7 Mar 2006 18:11:52 +0100
some more fixes (remove untagged window immediately out the way)
Diffstat:
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/cmd/wm/fs.c b/cmd/wm/fs.c
@@ -464,10 +464,11 @@ mkqid(Qid *dir, char *wname, Qid *new, Bool iswalk)
case FsFgeom:
case FsFname:
case FsFtags:
- if((dir_i1 == -1 || dir_i2 == -1 || dir_i3 == -1) || dir_type != FsDclient)
+ if((dir_type == FsDclient) && ((dir_i1 == -1 || dir_i2 == -1 || dir_i3 == -1)))
return -1;
- else if(dir_i1 == -1 || dir_type != FsDGclient)
+ else if(dir_i1 == -1 && dir_type != FsDGclient)
return -1;
+ else if((dir_type != FsDGclient) && (dir_type != FsDclient))
new->type = IXP_QTFILE;
new->path = mkqpath(type, qpath_i1id(dir->path), qpath_i2id(dir->path), qpath_i3id(dir->path));
break;
diff --git a/cmd/wm/tag.c b/cmd/wm/tag.c
@@ -239,10 +239,22 @@ update_ctags()
void
detach_fromtag(Tag *t, Client *c, Bool unmap)
{
- int i;
- for(i = 0; i < t->narea; i++)
- if(clientofarea(t->area[i], c))
+ int i, n = 0;
+ for(i = 0; i < t->narea; i++) {
+ if(clientofarea(t->area[i], c)) {
detach_fromarea(t->area[i], c);
+ XMoveWindow(dpy, c->framewin, 2 * rect.width, 0);
+ }
+ }
+ for(i = 0; i < t->narea; i++)
+ n += t->area[i]->nframe;
+ if(!n)
+ destroy_tag(t);
+ if(ntag) {
+ Client *c = sel_client_of_tag(tag[sel]);
+ focus_tag(tag[sel]);
+ focus_client(c);
+ }
}
void