commit 24f4a8b42d87a8242a377cacca9f43b5bdaa9ffd
parent 76a41dbdab11bc6476167f01775ea77fed63b4c5
Author: Anselm R. Garbe <garbeam@wmii.de>
Date: Tue, 17 Jan 2006 18:33:12 +0200
fixed mouse grabbing for the moment
Diffstat:
6 files changed, 5 insertions(+), 17 deletions(-)
diff --git a/cmd/wm/client.c b/cmd/wm/client.c
@@ -28,6 +28,10 @@ alloc_client(Window w)
void
focus_client(Client * c)
{
+ Client *old = sel_client();
+
+ if(old)
+ ungrab_client(old, AnyModifier, AnyButton);
grab_client(c, Mod1Mask, Button1);
grab_client(c, Mod1Mask, Button3);
c->frame->sel = c;
@@ -38,13 +42,6 @@ focus_client(Client * c)
}
void
-unfocus_client(Client * c)
-{
- ungrab_client(c, AnyModifier, AnyButton);
- grab_client(c, AnyModifier, AnyButton);
-}
-
-void
set_client_state(Client * c, int state)
{
long data[2];
@@ -60,7 +57,7 @@ map_client(Client * c)
{
XMapRaised(dpy, c->win);
set_client_state(c, NormalState);
- grab_client(c, AnyModifier, AnyButton);
+ /* grab_client(c, AnyModifier, AnyButton); */
}
void
diff --git a/cmd/wm/event.c b/cmd/wm/event.c
@@ -64,9 +64,6 @@ handle_buttonpress(XEvent * e)
handle_frame_buttonpress(ev, f);
else if((c = win_to_client(ev->window)) && c->frame) {
Layout *l = sel_layout();
- Client *old = sel_client();
- if(old != c)
- unfocus_client(old);
if(l != c->frame->layout)
focus_layout(c->frame->layout);
focus_client(c);
diff --git a/cmd/wm/layout_column.c b/cmd/wm/layout_column.c
@@ -420,8 +420,6 @@ focus_col(Layout *l, Client *c, Bool raise)
Client *old = sel_col(l);
Cell *cell = c->frame->aux;
- if(old != c)
- unfocus_client(old);
acme->sel = cell->col;
cell->col->sel = cell;
l->file[L_SEL_FRAME]->content = c->frame->file[F_PREFIX]->content;
diff --git a/cmd/wm/layout_float.c b/cmd/wm/layout_float.c
@@ -188,8 +188,6 @@ focus_float(Layout *l, Client *c, Bool raise)
Float *fl = l->aux;
Client *old = fl->sel->sel;
- if(old != c)
- unfocus_client(old);
fl->sel = c->frame;
l->file[L_SEL_FRAME]->content = c->frame->file[F_PREFIX]->content;
if(raise) {
diff --git a/cmd/wm/wm.c b/cmd/wm/wm.c
@@ -329,7 +329,6 @@ draw_detached_clients()
configure_client(c);
map_client(c);
XRaiseWindow(dpy, c->win);
- grab_client(c, AnyModifier, AnyButton);
XSync(dpy, False);
c = c->next;
}
diff --git a/cmd/wm/wm.h b/cmd/wm/wm.h
@@ -223,7 +223,6 @@ void unmap_client(Client * c);
void map_client(Client * c);
void reparent_client(Client * c, Window w, int x, int y);
void focus_client(Client * c);
-void unfocus_client(Client * c);
void attach_client(Client * c);
void detach_client(Client * c, Bool unmap);
Client *sel_client();