commit 280ce109357f58961452ed899620ef6c2b926dc2
parent 7741179d7406621c7d2a4b98d7c338478ca55a0f
Author: garbeam <garbeam@localhost>
Date: Tue, 10 Jan 2006 14:42:24 +0200
several changes concerning the focus issue
Diffstat:
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/cmd/wm/frame.c b/cmd/wm/frame.c
@@ -312,6 +312,7 @@ void
detach_client_from_frame(Client * c, Bool unmap)
{
Frame *f = c->frame;
+ Client *cl;
c->frame = nil;
if(f->sel == c) {
@@ -344,10 +345,10 @@ detach_client_from_frame(Client * c, Bool unmap)
c->rect.y = f->rect.y;
reparent_client(c, root, c->rect.x, c->rect.y);
}
- if(f->sel) {
- focus_client(f->sel);
- f->area->layout->focus(f, False);
- }
+ if((cl = sel_client())) {
+ f->area->layout->focus(cl->frame, False);
+ focus_client(cl);
+ }
}
static void
diff --git a/cmd/wm/layout_column.c b/cmd/wm/layout_column.c
@@ -429,10 +429,11 @@ focus_col(Frame * f, Bool raise)
acme->sel = cell->col;
cell->col->sel = cell;
- focus_client(f->sel);
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);
draw_frame(f);
}