commit f8e6a1370ce8bdb6965a2341037339b2ac28de18
parent 280ce109357f58961452ed899620ef6c2b926dc2
Author: garbeam <garbeam@localhost>
Date: Tue, 10 Jan 2006 15:43:09 +0200
fixed attach/focus issue in upstream hg
Diffstat:
4 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -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);
diff --git a/cmd/wm/frame.c b/cmd/wm/frame.c
@@ -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
diff --git a/cmd/wm/layout_column.c b/cmd/wm/layout_column.c
@@ -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);
}
diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c
@@ -824,6 +824,7 @@ cleanup()
}
}
XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime);
+ XSync(dpy, False);
}
int