Fix ticket #16.

This commit is contained in:
Kris Maglione 2008-03-12 19:29:13 -04:00
parent 37146f5b85
commit ff76a21c49
4 changed files with 12 additions and 7 deletions

View File

@ -485,7 +485,8 @@ client_focus(Client *c) {
flushevents(FocusChangeMask, true);
Dprint(DFocus, "client_focus([%C]%s) %ld\n", c, clientname(c), id);
if(screen->focus != c) {
Dprint(DFocus, "\t[%C]%s => [%C]%s\n", screen->focus, clientname(screen->focus),
Dprint(DFocus, "\t[%C]%s => [%C]%s\n",
screen->focus, clientname(screen->focus),
c, clientname(c));
if(c)
setfocus(&c->w, RevertToParent);

View File

@ -106,6 +106,8 @@ float_placeframe(Frame *f) {
*/
vector_rpush(vp, a->r);
for(ff=a->frame; ff; ff=ff->anext) {
if(ff == f)
continue;
fr = ff->r;
vp2->n = 0;
for(i=0; i < vp->n; i++) {

View File

@ -179,12 +179,12 @@ bdown_event(Window *w, XButtonEvent *e) {
if(!e->subwindow) {
frame_restack(f, nil);
view_restack(f->view);
if(rect_haspoint_p(Pt(e->x, e->y), f->grabbox))
mouse_movegrabbox(c);
else if(f->area->floating)
if(!e->subwindow && !rect_haspoint_p(Pt(e->x, e->y), f->titlebar))
mouse_resize(c, quadrant(f->r, Pt(e->x_root, e->y_root)));
}
if(rect_haspoint_p(Pt(e->x, e->y), f->grabbox))
mouse_movegrabbox(c);
else if(f->area->floating)
if(!e->subwindow && !rect_haspoint_p(Pt(e->x, e->y), f->titlebar))
mouse_resize(c, quadrant(f->r, Pt(e->x_root, e->y_root)));
if(f->client != selclient())
focus(c, false);

View File

@ -311,7 +311,9 @@ view_detach(Frame *f) {
if(c->sel == f)
c->sel = f->cnext;
if(v != screen->sel && empty_p(v))
if(v == screen->sel)
view_focus(screen, v);
else if(empty_p(v))
view_destroy(v);
}