Try harder not to focus doc windows.

This commit is contained in:
Kris Maglione 2010-05-29 11:54:38 -04:00
parent 0364acb2ab
commit fb1e4189d4
2 changed files with 6 additions and 2 deletions

View File

@ -273,6 +273,7 @@ area_detach(Frame *f) {
column_detach(f);
if(v->sel->sel == nil && v->floating->sel)
if(v->floating->sel->client->nofocus)
v->sel = v->floating;
view_arrange(v);

View File

@ -36,8 +36,11 @@ float_detach(Frame *f) {
frame_remove(f);
if(a->sel == f) {
while(pr && pr->client->nofocus)
pr = pr->aprev;
if(!pr)
pr = a->frame;
for(pr=a->frame; pr && pr->anext; pr=pr->anext)
if(!pr->client->nofocus) break;
a->sel = nil;
area_setsel(a, pr);
}
@ -45,7 +48,7 @@ float_detach(Frame *f) {
if(oldsel)
area_focus(oldsel);
else if(!a->frame)
else if(!a->frame || pr && pr->client->nofocus)
if(sel && sel->frame)
area_focus(sel);
}