fixed attach/focus issue in upstream hg

This commit is contained in:
garbeam 2006-01-10 15:43:09 +02:00
parent 280ce10935
commit f8e6a1370c
4 changed files with 5 additions and 10 deletions

View File

@ -34,6 +34,7 @@ focus_client(Client * c)
f->sel = c;
XRaiseWindow(dpy, c->win);
XSetInputFocus(dpy, c->win, RevertToPointerRoot, CurrentTime);
XSync(dpy, False);
invoke_wm_event(def[WM_EVENT_CLIENT_UPDATE]);
}
@ -51,7 +52,7 @@ set_client_state(Client * c, int state)
void
show_client(Client * c)
{
XMapWindow(dpy, c->win);
XMapRaised(dpy, c->win);
set_client_state(c, NormalState);
grab_client(c, Mod1Mask, Button1);
grab_client(c, Mod1Mask, Button3);

View File

@ -305,7 +305,6 @@ attach_client_to_frame(Frame * f, Client * client)
resize_frame(f, &f->rect, 0);
reparent_client(client, f->win, client->rect.x, client->rect.y);
show_client(client);
focus_client(client);
}
void

View File

@ -229,9 +229,6 @@ attach_col(Area * a, Client * c)
Column *col = acme->sel;
Frame *f = nil;
if(col && col->sel)
f = col->sel->frame;
if(!col) {
col = cext_emallocz(sizeof(Column));
col->rect = area_rect;
@ -424,17 +421,14 @@ focus_col(Frame * f, Bool raise)
Frame *old = sel_col(a);
Cell *cell = f->aux;
if(old == f)
return;
acme->sel = cell->col;
cell->col->sel = cell;
a->file[A_SEL_FRAME]->content = f->file[F_PREFIX]->content;
if(raise)
center_pointer(f);
XSync(dpy, False);
focus_client(f->sel);
draw_frame(old);
if(old && old != f)
draw_frame(old);
draw_frame(f);
}

View File

@ -824,6 +824,7 @@ cleanup()
}
}
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
XSync(dpy, False);
}
int